You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Several fixes in this commit:
* Added 'namespace' argument, default to 'eshop'.
* Every Helm command (`helm install` and `helm ls` used with `helm delete`) will honor the namespace parameter. This way this script is no longer destructive with the Kubernetes cluster. Usage() has been updated accordingly.
* Custom registry image push didn't honor `--docker-username` and `--docker-password`. A `docker login` has been added to fix the situation.
* AKS DNS discovery was not working properly due to case sensitivity with the JMESPath to the HTTPApplicationRouteZoneName. A small two-entries array with iterative loop has been added ton ensure either way the AKS http routing DNS retrieval is successful.
* Helm charts were enabled to use Kubernetes Ingress, but the `Ingress.spec.rules.host[]` was not honored with the `$dns` variable. This has been fixed in the `helm install` commands and now the script deploys the Ingress as expected.
dns="$(az aks show -n $aks_name -g $aks_rg --query $q -o tsv)"
183
+
if [[ -n$dns ]];thenbreak;fi
184
+
done
185
+
if [[ -z$dns ]];then
175
186
echo"Error: when getting DNS of AKS $aks_name (in resource group $aks_rg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged in and is of version 2.0.37 or higher."
176
187
exit 1
177
188
fi
178
-
$dns=${dns//[\"]/""}
179
189
echo"DNS base found is $dns. Will use $aks_name.$dns for the app!"
180
190
fi
181
191
@@ -186,8 +196,12 @@ fi
186
196
187
197
if [[ $clean ]];then
188
198
echo"Cleaning previous helm releases..."
189
-
helm delete --purge $(helm ls -q)
190
-
echo"Previous releases deleted"
199
+
if [[ -z$(helm ls -q --namespace $namespace) ]];then
200
+
echo"No previous releases found"
201
+
else
202
+
helm delete --purge $(helm ls -q --namespace $namespace)
203
+
echo"Previous releases deleted"
204
+
fi
191
205
fi
192
206
193
207
echo"#################### Begin $app_name installation using Helm ####################"
@@ -198,17 +212,17 @@ if [[ !$skip_infrastructure ]]; then
0 commit comments