feat: Add node affinity support for backup CronJob and update values.yaml

This commit is contained in:
sha
2026-03-18 11:26:25 +02:00
parent 07a3de1ffa
commit fa42f3ac8f
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -44,6 +44,17 @@ spec:
path: {{ .Values.backup.storagePath }}
type: DirectoryOrCreate
restartPolicy: OnFailure
{{- if .Values.backup.node }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- {{ .Values.backup.node }}
{{- else }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 10 }}
@@ -56,4 +67,5 @@ spec:
tolerations:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}