Skip to content

Commit

Permalink
Merge pull request #171 from MediaMarktSaturn/metronome-annotation-op…
Browse files Browse the repository at this point in the history
…tion

[HTTP-Metronome] Option to add podTemplate annotations
  • Loading branch information
heubeck authored Dec 5, 2024
2 parents 0cdb95c + 59a48ee commit 38ea24d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
podTemplate:
annotations:
linkerd.io/inject: disabled

jobs:
- name: this-is-just-a-test # MANDATORY: name of the cron-job that should be created
schedule: "* * * * *" # MANDATORY: cron expression this job trigger should run
target: http://the-cluster-local-service/the-path # MANDATORY: http endpoint within the cluster that should be called using GET
activeDeadlineSeconds: 60 # MANDATORY: maximum lifetime of a single job execution
2 changes: 1 addition & 1 deletion charts/http-metronome/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ maintainers:
- name: MediaMarktSaturn
url: https://github.com/MediaMarktSaturn
appVersion: 1.0.0
version: 1.0.0
version: 1.1.0
9 changes: 7 additions & 2 deletions charts/http-metronome/templates/CronJobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ spec:
ttlSecondsAfterFinished: {{ $.Values.ttlSecondsAfterFinished }}
activeDeadlineSeconds: {{ .activeDeadlineSeconds }}
template:
{{- if $.Values.istioManaged }}
metadata:
{{- if $.Values.istioManaged }}
labels:
istio-prometheus-ignore: "true"
{{- end }}
{{- end }}
annotations: {{ if not $.Values.podTemplate.annotations }}{}{{ else }}
{{- range $k, $v := $.Values.podTemplate.annotations }}
{{ $k }}: {{ $v | quote }}
{{- end }}
{{- end }}
spec:
automountServiceAccountToken: false
containers:
Expand Down
4 changes: 4 additions & 0 deletions charts/http-metronome/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ startingDeadlineSeconds: 200
# in an istio meshed environment, sidecar lifecycle has to be managed
istioManaged: false

# annotations to be added to the job template
podTemplate:
annotations: {}

# list of cronjobs that should run, structure see below.
jobs:
- name: this-is-just-a-test # MANDATORY: name of the cron-job that should be created
Expand Down

0 comments on commit 38ea24d

Please sign in to comment.