Skip to content

Commit

Permalink
Merge pull request #27 from factory24/feat/metadata-cronjob-addition
Browse files Browse the repository at this point in the history
Add metadata to cronjob template
  • Loading branch information
samtoya authored Oct 7, 2024
2 parents 5e7f38e + 38df483 commit 0dd6f3d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lint:
helm lint flow

template:
helm template flow-helm-chart flow --debug --values flow/values.yaml
helm template flow-helm-chart flow --values flow/values.yaml

bundle:
make lint
Expand Down
6 changes: 6 additions & 0 deletions flow/templates/cronjob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ spec:
backoffLimit: {{ .Values.cronJob.backoffLimit | default 5 }}
backoffLimitPerIndex: {{ .Values.cronJob.backoffLimitPerIndex }}
template:
{{ if and .Values.cronJob.metadata (not (empty .Values.cronJob.metadata)) }}
metadata:
{{ range $k, $v := .Values.cronJob.metadata }}
{{ $k }}: {{ $v }}
{{- end }}
{{- end }}
spec:
{{ if and .Values.cronJob.containers (not (empty .Values.cronJob.containers ) ) }}
containers:
Expand Down
1 change: 1 addition & 0 deletions flow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ cronJob:
namespace: default
schedule: "59 23 28-31 * *"
containers: { }
metadata: { }

persistentVolume:
enabled: false
Expand Down

0 comments on commit 0dd6f3d

Please sign in to comment.