From 4e18438f805a596454010dd9bf365023d49ca0fc Mon Sep 17 00:00:00 2001 From: Allen Li Date: Wed, 19 Apr 2023 16:01:26 -0400 Subject: [PATCH] cp3 migrate to aws Signed-off-by: Allen Li --- common/Makefile.common.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/Makefile.common.mk b/common/Makefile.common.mk index e0e3d760..4b896678 100644 --- a/common/Makefile.common.mk +++ b/common/Makefile.common.mk @@ -26,11 +26,15 @@ OLM_API_VERSION = 0.3.8 activate-serviceaccount: ifdef GOOGLE_APPLICATION_CREDENTIALS - gcloud auth activate-service-account --key-file="$(GOOGLE_APPLICATION_CREDENTIALS)" + gcloud auth activate-service-account --key-file="$(GOOGLE_APPLICATION_CREDENTIALS)" || true endif get-cluster-credentials: activate-serviceaccount - gcloud container clusters get-credentials "$(CLUSTER)" --project="$(PROJECT)" --zone="$(ZONE)" + mkdir -p ~/.kube; cp -v /etc/kubeconfig/config ~/.kube; kubectl config use-context default; kubectl get nodes; echo going forward retiring google cloud + +ifdef GOOGLE_APPLICATION_CREDENTIALS + gcloud container clusters get-credentials "$(CLUSTER)" --project="$(PROJECT)" --zone="$(ZONE)" || true +endif config-docker: get-cluster-credentials @common/scripts/artifactory_config_docker.sh