diff --git a/hack/local-up-cluster.sh b/hack/local-up-cluster.sh index 9fadd23db82..e2af014e05a 100755 --- a/hack/local-up-cluster.sh +++ b/hack/local-up-cluster.sh @@ -436,7 +436,7 @@ function start_apiserver { # Admission Controllers to invoke prior to persisting objects in cluster # # ResourceQuota must come last, or a creation is recorded, but the pod may be forbidden. - ADMISSION_CONTROL=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount${security_admission},DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota + ADMISSION_CONTROL=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount${security_admission},DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,PodPreset # This is the default dir and filename where the apiserver will generate a self-signed cert # which should be able to be used as the CA to verify itself @@ -479,6 +479,13 @@ function start_apiserver { RUNTIME_CONFIG+="admissionregistration.k8s.io/v1alpha1" fi + if [[ ${ADMISSION_CONTROL} == *"PodPreset"* ]]; then + if [[ -n "${RUNTIME_CONFIG}" ]]; then + RUNTIME_CONFIG+="," + fi + RUNTIME_CONFIG+="settings.k8s.io/v1alpha1" + fi + runtime_config="" if [[ -n "${RUNTIME_CONFIG}" ]]; then runtime_config="--runtime-config=${RUNTIME_CONFIG}"