From a1209067562b328d85c265e752a1f78b045c6cfb Mon Sep 17 00:00:00 2001 From: Mike Danese Date: Mon, 31 Jul 2017 13:39:18 -0700 Subject: [PATCH] gce: extend CLOBBER_CONFIG to support known_tokens.csv --- cluster/gce/gci/configure-helper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cluster/gce/gci/configure-helper.sh b/cluster/gce/gci/configure-helper.sh index beaee497d76..8734d0a2860 100644 --- a/cluster/gce/gci/configure-helper.sh +++ b/cluster/gce/gci/configure-helper.sh @@ -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