Merge pull request #78008 from mikedanese/fixunset

cluster/gce: fix unset variable when insecure port is enabled
This commit is contained in:
Kubernetes Prow Robot 2019-05-17 10:12:46 -07:00 committed by GitHub
commit 20d6b2ff11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2848,7 +2848,7 @@ function wait-till-apiserver-ready() {
function ensure-bootstrap-kubectl-auth {
# Creating an authenticated kubeconfig is only necessary if the insecure port is disabled.
if [[ -n "${KUBE_BOOTSTRAP_TOKEN}" ]]; then
if [[ -n "${KUBE_BOOTSTRAP_TOKEN:-}" ]]; then
create-kubeconfig "cluster-bootstrap" ${KUBE_BOOTSTRAP_TOKEN}
export KUBECONFIG=/etc/srv/kubernetes/cluster-bootstrap/kubeconfig
fi