mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 11:33:17 +00:00
feat: Add node affinity support for backup CronJob and update values.yaml
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user