mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +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 }}
|
path: {{ .Values.backup.storagePath }}
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
restartPolicy: OnFailure
|
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 }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml . | nindent 10 }}
|
||||||
@@ -56,4 +67,5 @@ spec:
|
|||||||
tolerations:
|
tolerations:
|
||||||
{{- toYaml . | nindent 10 }}
|
{{- toYaml . | nindent 10 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ backup:
|
|||||||
retentionDays: 10
|
retentionDays: 10
|
||||||
storagePath: /storage/backups/postgres
|
storagePath: /storage/backups/postgres
|
||||||
resources: {}
|
resources: {}
|
||||||
|
# Node to run backup on (hostname). If set, overrides global affinity/tolerations for the backup CronJob.
|
||||||
|
node: ""
|
||||||
|
|
||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user