Add KUBE_EMULATED_VERSION env variable to set the emulated-version of scheduler and controller manager.

Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
Siyuan Zhang 2024-07-23 11:24:13 -07:00
parent 6834a1ef3d
commit e79d20dcfc

View File

@ -2241,6 +2241,9 @@ function start-kube-controller-manager {
if [[ -n "${FEATURE_GATES:-}" ]]; then
params+=("--feature-gates=${FEATURE_GATES}")
fi
if [[ -n "${KUBE_EMULATED_VERSION:-}" ]]; then
params+=("--emulated-version=kube=${KUBE_EMULATED_VERSION}")
fi
if [[ -n "${VOLUME_PLUGIN_DIR:-}" ]]; then
params+=("--flex-volume-plugin-dir=${VOLUME_PLUGIN_DIR}")
fi
@ -2454,6 +2457,9 @@ function start-kube-scheduler {
if [[ -n "${FEATURE_GATES:-}" ]]; then
params+=("--feature-gates=${FEATURE_GATES}")
fi
if [[ -n "${KUBE_EMULATED_VERSION:-}" ]]; then
params+=("--emulated-version=kube=${KUBE_EMULATED_VERSION}")
fi
# Scheduler Component Config takes precedence over some flags.
if [[ -n "${KUBE_SCHEDULER_CONFIG:-}" ]]; then