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 }}