🔒️ Fix kubeconfig permissions

This commit is contained in:
Jérôme Petazzoni
2022-11-15 04:17:38 +01:00
parent 99ffd88c4c
commit 9a9b1ca198
+3
View File
@@ -6,6 +6,9 @@ if ! [ -f ~/.kube/config ]; then
# We need to access the Kubernetes API, so we'll do it
# using the well-known endpoint.
(
# Make sure that the file will have locked-down permissions.
# (Some tools like Helm will complain about it otherwise.)
umask 077
export KUBERNETES_SERVICE_HOST=kubernetes.default.svc
export KUBERNETES_SERVICE_PORT=443
if kubectl get configmap kubeconfig >&/dev/null; then