|
|
|
@ -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)')"
|
|
|
|
|