Skip to content

Commit c5a3343

Browse files
committed
gce: extend CLOBBER_CONFIG to support known_tokens.csv
1 parent e0dcdf2 commit c5a3343

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cluster/gce/gci/configure-helper.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ function create-master-auth {
298298
fi
299299
append_or_replace_prefixed_line "${basic_auth_csv}" "${KUBE_PASSWORD},${KUBE_USER}," "admin,system:masters"
300300
fi
301+
301302
local -r known_tokens_csv="${auth_dir}/known_tokens.csv"
303+
if [[ -e "${known_tokens_csv}" && "${METADATA_CLOBBERS_CONFIG:-false}" == "true" ]]; then
304+
rm "${known_tokens_csv}"
305+
fi
302306
if [[ -n "${KUBE_BEARER_TOKEN:-}" ]]; then
303307
append_or_replace_prefixed_line "${known_tokens_csv}" "${KUBE_BEARER_TOKEN}," "admin,admin,system:masters"
304308
fi

0 commit comments

Comments
 (0)