Commit 9a571d9b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42450 from Q-Lee/fix-unbound

Automatic merge from submit-queue Fixing unbound bash variable. **What this PR does / why we need it**: this fixes a bug introduced in 1.6 for ABAC. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: without this, we hit an unbound variable and fail to bring up the kube-apiserver with ABAC enabled. **Release note**: ```release-note ```
parents 6d92abdc 4628abfd
......@@ -1081,6 +1081,7 @@ function start-kube-apiserver {
local authorization_mode="RBAC"
local -r src_dir="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty"
# Create the ABAC file only if it's explicitly requested.
if [[ -n "${ENABLE_LEGACY_ABAC_16_ONLY:-}" ]]; then
......@@ -1111,7 +1112,6 @@ function start-kube-apiserver {
webhook_config_mount="{\"name\": \"webhookconfigmount\",\"mountPath\": \"/etc/gcp_authz.config\", \"readOnly\": false},"
webhook_config_volume="{\"name\": \"webhookconfigmount\",\"hostPath\": {\"path\": \"/etc/gcp_authz.config\"}},"
fi
local -r src_dir="${KUBE_HOME}/kube-manifests/kubernetes/gci-trusty"
params+=" --authorization-mode=${authorization_mode}"
local container_env=""
......
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