Commit a0fe9edd authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49808 from dims/fix-dynamic-admission-control-in-local-cluster

Automatic merge from submit-queue (batch tested with PRs 48365, 49902, 49808, 48722, 47045) Add admission controller API to runtime config and externalize ADMISSION_CONTROL **What this PR does / why we need it**: Enable the dynamic admission controller registration API by adding "admissionregistration.k8s.io/v1alpha1" to --runtime-config to fix problems when starting up local-up-cluster. Also make sure ADMISSION_CONTROL can be specified externally. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # Fixes #47385 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 3db04731 13558335
...@@ -91,6 +91,7 @@ export KUBE_CACHE_MUTATION_DETECTOR ...@@ -91,6 +91,7 @@ export KUBE_CACHE_MUTATION_DETECTOR
KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}" KUBE_PANIC_WATCH_DECODE_ERROR="${KUBE_PANIC_WATCH_DECODE_ERROR:-true}"
export KUBE_PANIC_WATCH_DECODE_ERROR export KUBE_PANIC_WATCH_DECODE_ERROR
ADMISSION_CONTROL=${ADMISSION_CONTROL:-""}
ADMISSION_CONTROL_CONFIG_FILE=${ADMISSION_CONTROL_CONFIG_FILE:-""} ADMISSION_CONTROL_CONFIG_FILE=${ADMISSION_CONTROL_CONFIG_FILE:-""}
# START_MODE can be 'all', 'kubeletonly', or 'nokubelet' # START_MODE can be 'all', 'kubeletonly', or 'nokubelet'
...@@ -441,6 +442,14 @@ function start_apiserver { ...@@ -441,6 +442,14 @@ function start_apiserver {
if [[ -n "${ALLOW_PRIVILEGED}" ]]; then if [[ -n "${ALLOW_PRIVILEGED}" ]]; then
priv_arg="--allow-privileged " priv_arg="--allow-privileged "
fi fi
if [[ ${ADMISSION_CONTROL} == *"Initializers"* ]]; then
if [[ -n "${RUNTIME_CONFIG}" ]]; then
RUNTIME_CONFIG+=","
fi
RUNTIME_CONFIG+="admissionregistration.k8s.io/v1alpha1"
fi
runtime_config="" runtime_config=""
if [[ -n "${RUNTIME_CONFIG}" ]]; then if [[ -n "${RUNTIME_CONFIG}" ]]; then
runtime_config="--runtime-config=${RUNTIME_CONFIG}" runtime_config="--runtime-config=${RUNTIME_CONFIG}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment