updated gcp_secrets_to_kubernetes_multipart.sh

pull/2/head
Hari Sekhon 4 years ago
parent 60cc5fe4bd
commit 071e62ff9d

@ -20,6 +20,9 @@ srcdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=SC1090
. "$srcdir/lib/utils.sh"
# shellcheck disable=SC1090
. "$srcdir/lib/kubernetes.sh"
# shellcheck disable=SC2034,SC2154
usage_description="
Loads a given list of GCP Secret Manager secrets to a single Kubernetes secret
@ -45,11 +48,7 @@ help_usage "$@"
min_args 3 "$@"
# fix kube cluster to protect consistency against k8s race conditions
kubeconfig="/tmp/.kube/config.${EUID:-$UID}.$$"
mkdir -p "$(dirname "$kubeconfig")"
cp -f "${KUBECONFIG:-$HOME/.kube/config}" "$kubeconfig"
export KUBECONFIG="$kubeconfig"
kube_config_isolate
# XXX: fix the GCP project for the duration of the script for consistency
project="$(gcloud config list --format='get(core.project)')"

Loading…
Cancel
Save