Skip to content

Commit d9942f0

Browse files
Uninstall Helm charts if they already exist
1 parent c5dd222 commit d9942f0

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

deploy/init-hacbs-user-workspace-sa-rbac.sh

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/sh
22

3+
EXISTING=$(KUBECONFIG=$CLUSTER_KUBECONFIG helm list | grep kcp-hacbs-workspace-compute-cluster-rbac)
4+
5+
if [[ ! -z $EXISTING ]]
6+
then
7+
KUBECONFIG=$CLUSTER_KUBECONFIG helm uninstall $EXISTING
8+
fi
9+
310
DIR=`dirname $0`
411
#CLUSTER_KUBECONFIG should match whatever you have set in your infra-deployments preview.env file
512
#HABCS_WORKSPACE_NAMESPACE is the name of whatever namespace in the KCP hacbs ws that you ran init-hacbs-user-workspace.sh from

deploy/init-hacbs-user-workspace.sh

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#!/bin/sh
22

33
DIR=`dirname $0`
4+
5+
KUBECONFIG=$KCP_KUBECONFIG oc ws hacbs
6+
KUBECONFIG=$KCP_KUBECONFIG oc create ns $HACBS_WORKSPACE_NAMESPACE
7+
KUBECONFIG=$KCP_KUBECONFIG oc project $HACBS_WORKSPACE_NAMESPACE
8+
9+
EXISTING=$(KUBECONFIG=$KCP_KUBECONFIG helm list | grep kcp-hacbs-workspace-init)
10+
11+
if [[ ! -z $EXISTING ]]
12+
then
13+
KUBECONFIG=$KCP_KUBECONFIG helm uninstall $EXISTING
14+
fi
15+
416
#KCP_KUBECONFIG should match whatever you have set in your infra-deployments preview.env file
517
#QUAY_USERNAME and QUAY_TOKEN are the same env's you use in the other dev flow scripts
618
#QUAY_TAG is either the sha for the images up at quay.io/redhat-appstudio or 'dev' if you are using

0 commit comments

Comments
 (0)