Use existing ABAC policy file when upgrading GCE cluster

This commit is contained in:
Jordan Liggitt 2017-01-19 15:25:01 -05:00
parent 80f3e93b9a
commit e6a63c8f40
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012

View File

@ -900,6 +900,9 @@ function start-kube-apiserver {
local authorization_mode="RBAC"
# Load existing ABAC policy files written by versions < 1.6 of this script
# TODO: only default to this legacy path when in upgrade mode
ABAC_AUTHZ_FILE="${ABAC_AUTHZ_FILE:-/etc/srv/kubernetes/abac-authz-policy.jsonl}"
if [[ -n "${ABAC_AUTHZ_FILE:-}" && -e "${ABAC_AUTHZ_FILE}" ]]; then
params+=" --authorization-policy-file=${ABAC_AUTHZ_FILE}"
authorization_mode+=",ABAC"