Skip to content

Commit 8eaee17

Browse files
authored
Merge pull request #15 from SovereignCloudStack/fix/protect-wlcluster-kubeconfig
Protect workload cluster cluster-admin kubeconfig.
2 parents 6e9ab9e + b67b9b4 commit 8eaee17

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

08-wait-cluster.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ kubectl wait --timeout=14m --for=condition=certificatesavailable -n "$CS_NAMESPA
1717
kubectl get -n "$CS_NAMESPACE" cluster $CL_NAME
1818
clusterctl describe cluster -n "$CS_NAMESPACE" $CL_NAME --grouping=false
1919
KCFG=~/.kube/$CS_NAMESPACE.$CL_NAME
20+
OLDUMASK=$(umask)
21+
umask 0077
2022
clusterctl get kubeconfig -n "$CS_NAMESPACE" $CL_NAME > $KCFG
23+
umask $OLDUMASK
2124
KUBECONFIG=$KCFG kubectl get nodes -o wide
2225
KUBECONFIG=$KCFG kubectl get pods -A
2326
echo "# Hint: Use KUBECONFIG=$KCFG kubectl ... to access you workload cluster $CS_NAMESPACE/$CL_NAME"

0 commit comments

Comments
 (0)