mirror of https://github.com/k3s-io/k3s
Add abac_authorization_file local var to allow ABAC_AUTHZ_FILE to be set outside the script.
parent
355f576c0b
commit
1534cbf1fa
|
@ -1108,9 +1108,9 @@ function start-kube-apiserver {
|
||||||
|
|
||||||
# Load existing ABAC policy files written by versions < 1.6 of this script
|
# Load existing ABAC policy files written by versions < 1.6 of this script
|
||||||
# TODO: only default to this legacy path when in upgrade mode
|
# TODO: only default to this legacy path when in upgrade mode
|
||||||
ABAC_AUTHZ_FILE="${ABAC_AUTHZ_FILE:-/etc/srv/kubernetes/abac-authz-policy.jsonl}"
|
local abac_authorization_file="${ABAC_AUTHZ_FILE:-/etc/srv/kubernetes/abac-authz-policy.jsonl}"
|
||||||
if [[ -n "${ABAC_AUTHZ_FILE:-}" && -e "${ABAC_AUTHZ_FILE}" ]]; then
|
if [[ -n "${abac_authorization_file:-}" && -e "${abac_authorization_file}" ]]; then
|
||||||
params+=" --authorization-policy-file=${ABAC_AUTHZ_FILE}"
|
params+=" --authorization-policy-file=${abac_authorization_file}"
|
||||||
authorization_mode+=",ABAC"
|
authorization_mode+=",ABAC"
|
||||||
fi
|
fi
|
||||||
local webhook_config_mount=""
|
local webhook_config_mount=""
|
||||||
|
|
Loading…
Reference in New Issue