Skip to content

Commit cfc5e5e

Browse files
authored
Allow skipping getting specific kubeconfig
1 parent 7e35e65 commit cfc5e5e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

entrypoint-jnlp.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
! [ -e /etc/ckan-cloud/.kube-config ] && echo missing /etc/ckan-cloud/.kube-config && exit 1
55
! [ -z "${KUBE_CONTEXT}" ] && kubectl config use-context "${KUBE_CONTEXT}" >/dev/null 2>&1
66
export KUBECONFIG=/etc/ckan-cloud/.kube-config
7+
8+
if [ -z "${SKIP_GET_KUBECONFIG}" ]; then
79
USER_KUBECONFIG=`mktemp`
810
if ! [ "$(ckan-cloud-operator config get --key=ckan-cloud-provider-cluster-main-provider-id --raw)" == "aws" ]; then
911
ckan-cloud-operator activate-gcloud-auth >/dev/null 2>&1
1012
fi &&\
1113
ckan-cloud-operator users get-kubeconfig "${CKAN_CLOUD_USER_NAME}" > "${USER_KUBECONFIG}"
1214
[ "$?" != "0" ] && echo failed to get authentication credentials && exit 1
15+
fi
1316

1417
rm -rf .config/gcloud
1518

0 commit comments

Comments
 (0)