Skip to content

Commit

Permalink
GDB-11193: Time zone configurations for the backup cron job
Browse files Browse the repository at this point in the history
Added a new configuration that allows to override the default timezone
which usually is the local timezone.
  • Loading branch information
mihailradkov committed Jan 26, 2025
1 parent 3505ba1 commit 49c4920
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Added `cluster.tls.certificateRevocationList` to configure a certificate revocation list
- Updated jobs and scripts to use `https` or `http` depending on whether the Tomcat connector security is configured
- Added `indices` configuration enabling a job for initial preloading of indices and other SPARQL updates
- Added `backup.timezone` configuration for overriding the default timezone with a specific one

## Version 11.3.3

Expand Down
3 changes: 3 additions & 0 deletions templates/jobs/cronjob-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- end }}
spec:
schedule: {{ .Values.backup.schedule | quote }}
{{- if and .Values.backup.timezone (semverCompare ">=1.27-0" .Capabilities.KubeVersion.Version) }}
timeZone: {{ .Values.backup.timezone }}
{{- end }}
successfulJobsHistoryLimit: {{ .Values.backup.successfulJobsHistoryLimit }}
failedJobsHistoryLimit: {{ .Values.backup.failedJobsHistoryLimit }}
concurrencyPolicy: Forbid
Expand Down
6 changes: 6 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,12 @@ backup:
# Ref: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#schedule-syntax
schedule: "@midnight"

# Specifies the time zone for the cron job. If not specified, Kubernetes will use the local time zone by default.
# This requires Kubernetes v1.27 or greater.
#
# Ref: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
timezone: ""

# Backup options that will be injected as JSON in the default backup options Secret. \
# These configurations define the backup behaviour such as including or excluding repositories or system data.
#
Expand Down

0 comments on commit 49c4920

Please sign in to comment.