Skip to content

Commit 38ea24d

Browse files
authored
Merge pull request #171 from MediaMarktSaturn/metronome-annotation-option
[HTTP-Metronome] Option to add podTemplate annotations
2 parents 0cdb95c + 59a48ee commit 38ea24d

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
podTemplate:
2+
annotations:
3+
linkerd.io/inject: disabled
4+
5+
jobs:
6+
- name: this-is-just-a-test # MANDATORY: name of the cron-job that should be created
7+
schedule: "* * * * *" # MANDATORY: cron expression this job trigger should run
8+
target: http://the-cluster-local-service/the-path # MANDATORY: http endpoint within the cluster that should be called using GET
9+
activeDeadlineSeconds: 60 # MANDATORY: maximum lifetime of a single job execution

charts/http-metronome/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ maintainers:
77
- name: MediaMarktSaturn
88
url: https://github.com/MediaMarktSaturn
99
appVersion: 1.0.0
10-
version: 1.0.0
10+
version: 1.1.0

charts/http-metronome/templates/CronJobs.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ spec:
2222
ttlSecondsAfterFinished: {{ $.Values.ttlSecondsAfterFinished }}
2323
activeDeadlineSeconds: {{ .activeDeadlineSeconds }}
2424
template:
25-
{{- if $.Values.istioManaged }}
2625
metadata:
26+
{{- if $.Values.istioManaged }}
2727
labels:
2828
istio-prometheus-ignore: "true"
29-
{{- end }}
29+
{{- end }}
30+
annotations: {{ if not $.Values.podTemplate.annotations }}{}{{ else }}
31+
{{- range $k, $v := $.Values.podTemplate.annotations }}
32+
{{ $k }}: {{ $v | quote }}
33+
{{- end }}
34+
{{- end }}
3035
spec:
3136
automountServiceAccountToken: false
3237
containers:

charts/http-metronome/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ startingDeadlineSeconds: 200
2222
# in an istio meshed environment, sidecar lifecycle has to be managed
2323
istioManaged: false
2424

25+
# annotations to be added to the job template
26+
podTemplate:
27+
annotations: {}
28+
2529
# list of cronjobs that should run, structure see below.
2630
jobs:
2731
- name: this-is-just-a-test # MANDATORY: name of the cron-job that should be created

0 commit comments

Comments
 (0)