Add KUBE_EMULATED_VERSION env variable to set the emulated-version of apiserver.

Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
Siyuan Zhang 2024-06-26 11:20:10 -07:00
parent a4b8d0faa8
commit 126a47d4b5

View File

@ -256,6 +256,9 @@ function start-kube-apiserver {
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 "${MASTER_ADVERTISE_ADDRESS:-}" ]]; then
params+=" --advertise-address=${MASTER_ADVERTISE_ADDRESS}"
elif [[ -n "${PROJECT_ID:-}" && -n "${TOKEN_URL:-}" && -n "${TOKEN_BODY:-}" && -n "${NODE_NETWORK:-}" ]]; then