File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 46
46
update-kubeconfig --name ${CLUSTER_NAME}
47
47
fi
48
48
49
+ # Check if namespace exists and create it if it doesn't.
50
+ KUBE_NAMESPACE_EXISTS=$( kubectl get namespaces | _grep ^${DEPLOY_NAMESPACE} )
51
+ if [ -z " ${KUBE_NAMESPACE_EXISTS} " ]; then
52
+ echo " The namespace ${DEPLOY_NAMESPACE} does not exists. Creating..."
53
+ kubectl create namespace " ${DEPLOY_NAMESPACE} "
54
+ else
55
+ echo " The namespace ${DEPLOY_NAMESPACE} exists. Skipping creation..."
56
+ fi
57
+
58
+
49
59
# If defined, will set up authentication parameters
50
60
if [ " ${HELM_ACTION} " == " install" ] && [ " ${OCI_REGISTRY} " != " true" ]; then
51
61
125
135
126
136
if [ " ${HELM_ACTION} " == " install" ]; then
127
137
# Upgrade or install the chart. This does it all.
128
- HELM_COMMAND=" helm upgrade --install --create-namespace -- timeout ${TIMEOUT} ${HELM_AUTH} "
138
+ HELM_COMMAND=" helm upgrade --install --timeout ${TIMEOUT} ${HELM_AUTH} "
129
139
130
140
# If we should wait, then do so
131
141
if [ -n " ${HELM_WAIT} " ]; then
You can’t perform that action at this time.
0 commit comments