You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
Bash
63 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
# vim:ts=4:sts=4:sw=4:et
|
|
#
|
|
# Author: Hari Sekhon
|
|
# Date: Mon Feb 22 17:42:01 2021 +0000
|
|
#
|
|
# https://github.com/HariSekhon/DevOps-Bash-tools
|
|
#
|
|
# License: see accompanying Hari Sekhon LICENSE file
|
|
#
|
|
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
|
|
#
|
|
# https://www.linkedin.com/in/HariSekhon
|
|
#
|
|
|
|
set -euo pipefail
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
srcdir="$(dirname "${BASH_SOURCE[0]}")"
|
|
|
|
# If using other services, infer the environment variables to put below by reading:
|
|
#
|
|
# gcloud topic configurations
|
|
# or
|
|
# gcloud config set --help
|
|
|
|
# XXX: Edit
|
|
export CLOUDSDK_CORE_PROJECT=myproject
|
|
|
|
# XXX: Edit
|
|
export REGION=europe-west2
|
|
|
|
export CLOUDSDK_COMPUTE_REGION="$REGION"
|
|
export CLOUDSDK_COMPUTE_ZONE="${REGION}-a" # or b or c
|
|
|
|
export CLOUDSDK_AI_REGION="$REGION"
|
|
export CLOUDSDK_AI_PLATFORM_REGION="$REGION"
|
|
export CLOUDSDK_DATAPROC_REGION="$REGION"
|
|
export CLOUDSDK_DEPLOY_REGION="$REGION"
|
|
export CLOUDSDK_FILESTORE_REGION="$REGION"
|
|
export CLOUDSDK_FUNCTIONS_REGION="$REGION"
|
|
export CLOUDSDK_MEMCACHE_REGION="$REGION"
|
|
export CLOUDSDK_REDIS_REGION="$REGION"
|
|
export CLOUDSDK_RUN_REGION="$REGION"
|
|
export CLOUDSDK_RUN_CLUSTER_LOCATION="$REGION"
|
|
export CLOUDSDK_VMWARE_REGION="$REGION"
|
|
|
|
# XXX: Edit
|
|
export CLOUDSDK_RUN_PLATFORM=managed
|
|
#export CLOUDSDK_RUN_PLATFORM=gke
|
|
#export CLOUDSDK_RUN_PLATFORM=kubernetes
|
|
#export CLOUDSDK_RUN_CLUSTER=mycluster
|
|
|
|
export CLOUDSDK_GCLOUDIGNORE_ENABLED=True
|
|
|
|
# XXX: Edit
|
|
export CLOUDSDK_CONTAINER_CLUSTER=mycluster # GKE cluster name
|
|
#export CLOUDSDK_BUILDS_USE_KANIKO=True
|
|
|
|
export GKE_CONTEXT="gke_${CLOUDSDK_CORE_PROJECT}_${CLOUDSDK_COMPUTE_REGION}_${CLOUDSDK_CONTAINER_CLUSTER}"
|
|
|
|
# shellcheck disable=SC1090
|
|
. "$srcdir/.envrc-kubernetes" "$GKE_CONTEXT"
|