Skip to content

Commit

Permalink
feat(cronjob): add annotations support in pod template (#1170)
Browse files Browse the repository at this point in the history
chore(cronjob): move annotations under pod template

Signed-off-by: Valentin Maillot <[email protected]>
  • Loading branch information
vmaillot authored Dec 22, 2023
1 parent 1c2e398 commit 985d638
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 2 additions & 5 deletions charts/openshift-etcd-backup/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: openshift-etcd-backup
description: Chart for openshift-etcd-backup solution
type: application
version: 1.7.1
version: 1.7.2
appVersion: v1.7.1
keywords:
- openshift-etcd-backup
Expand All @@ -20,7 +20,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "bump openshift-etcd-backup image to v1.7.1"
links:
- name: openshift-etcd-backup release v1.7.1
url: https://github.com/adfinis/openshift-etcd-backup/releases/tag/v1.7.1
description: "add annotations support for jobTemplate"
3 changes: 2 additions & 1 deletion charts/openshift-etcd-backup/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions charts/openshift-etcd-backup/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ spec:
# job immediately if the first execution fails.
backoffLimit: 0
template:
{{- with .Values.annotations }}
metadata:
annotations:
{{- toYaml . | nindent 12 }}
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 12 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/openshift-etcd-backup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ tolerations:

affinity: {}

annotations: {}

monitoring:
# -- Deploy PrometheusRule to be alerted in case of backup fails as decribed [here](https://github.com/adfinis/openshift-etcd-backup/blob/main/etcd-backup-cronjob-monitor.PrometheusRule.yaml).
# Be sure to to have monitoring for user defined projects enabled as [described in the upstream documentation](https://docs.openshift.com/container-platform/4.6/monitoring/enabling-monitoring-for-user-defined-projects.html).
Expand Down

0 comments on commit 985d638

Please sign in to comment.