Skip to content

Commit 32d0aea

Browse files
committed
fix(chart): job to cleanup scaled objects run always
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent fb260f3 commit 32d0aea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

charts/selenium-grid/templates/patch-keda/patch-keda-objects-job.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and (eq (include "seleniumGrid.useKEDA" $) "true") $.Values.autoscaling.patchObjectFinalizers.enabled }}
1+
{{- if $.Values.autoscaling.patchObjectFinalizers.enabled }}
22
apiVersion: batch/v1
33
kind: Job
44
metadata:
@@ -28,6 +28,7 @@ spec:
2828
command: ["/bin/bash", "-c"]
2929
args:
3030
- |
31+
echo "Cleaning up ScaledObjects, ScaledJobs and HPAs for {{ .Release.Name }} when upgrading or disabling autoscaling."
3132
kubectl get ScaledObjects,ScaledJobs -n {{ .Release.Namespace }} -l component.autoscaling={{ .Release.Name }} -o=json | jq '.metadata.finalizers = null' | kubectl apply -f - || true ;
3233
kubectl delete ScaledObjects,ScaledJobs -n {{ .Release.Namespace }} -l component.autoscaling={{ .Release.Name }} --wait || true ;
3334
kubectl delete hpa -n {{ .Release.Namespace }} -l component.autoscaling={{ .Release.Name }} --wait || true ;

charts/selenium-grid/values.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,6 @@ customLabels: {}
12261226
# Configuration for dependency chart keda
12271227
keda:
12281228
additionalAnnotations:
1229-
"helm.sh/hook": pre-install,pre-upgrade,pre-rollback
12301229
http:
12311230
timeout: 60000
12321231
webhooks:

0 commit comments

Comments
 (0)