From b441aa6bff670d5194bea712fd843a9f4421e087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bas=20Magr=C3=A9?= Date: Thu, 21 May 2026 21:46:39 +0200 Subject: [PATCH] add node select option for hook job --- charts/octopus-deploy/templates/pre-upgrade-hook.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/charts/octopus-deploy/templates/pre-upgrade-hook.yaml b/charts/octopus-deploy/templates/pre-upgrade-hook.yaml index 2b04f4a1..0a51c605 100644 --- a/charts/octopus-deploy/templates/pre-upgrade-hook.yaml +++ b/charts/octopus-deploy/templates/pre-upgrade-hook.yaml @@ -81,5 +81,13 @@ spec: echo "StatefulSet $sts has helm.sh/chart in selector matchLabels. Deleting with --cascade=orphan..." kubectl delete statefulset "$sts" --namespace={{ .Release.Namespace }} --cascade=orphan done + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} backoffLimit: 1 {{- end }}