mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
gce: extend CLOBBER_CONFIG to support known_tokens.csv
This commit is contained in:
parent
a1c0510d00
commit
a120906756
@ -359,7 +359,11 @@ function create-master-auth {
|
||||
fi
|
||||
append_or_replace_prefixed_line "${basic_auth_csv}" "${KUBE_PASSWORD},${KUBE_USER}," "admin,system:masters"
|
||||
fi
|
||||
|
||||
local -r known_tokens_csv="${auth_dir}/known_tokens.csv"
|
||||
if [[ -e "${known_tokens_csv}" && "${METADATA_CLOBBERS_CONFIG:-false}" == "true" ]]; then
|
||||
rm "${known_tokens_csv}"
|
||||
fi
|
||||
if [[ -n "${KUBE_BEARER_TOKEN:-}" ]]; then
|
||||
append_or_replace_prefixed_line "${known_tokens_csv}" "${KUBE_BEARER_TOKEN}," "admin,admin,system:masters"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user