Skip to content

Commit 6d70e7f

Browse files
authored
Merge pull request kubernetes#77930 from mm4tt/upload_kubeconfig
Upload kubeconfig to master metadata in tests.
2 parents b3981a2 + 7e7570d commit 6d70e7f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

cluster/gce/config-test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,5 @@ WINDOWS_NODE_TAINTS="${WINDOWS_NODE_TAINTS:-node.kubernetes.io/os=win1809:NoSche
525525
GCE_PRIVATE_CLUSTER="${KUBE_GCE_PRIVATE_CLUSTER:-false}"
526526

527527
ETCD_LISTEN_CLIENT_IP=0.0.0.0
528+
529+
GCE_UPLOAD_KUBCONFIG_TO_MASTER_METADATA=true

cluster/gce/util.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,11 @@ function check-cluster() {
30173017

30183018
# ensures KUBECONFIG is set
30193019
get-kubeconfig-basicauth
3020+
3021+
if [[ ${GCE_UPLOAD_KUBCONFIG_TO_MASTER_METADATA:-} == "true" ]]; then
3022+
gcloud compute instances add-metadata "${MASTER_NAME}" --zone="${ZONE}" --metadata-from-file="kubeconfig=${KUBECONFIG}" || true
3023+
fi
3024+
30203025
echo
30213026
echo -e "${color_green}Kubernetes cluster is running. The master is running at:"
30223027
echo

0 commit comments

Comments
 (0)