Skip to content

Commit 766c84c

Browse files
reixdRainer 'rei' Schuth
andauthored
Cronjobs rename job name (#15)
Co-authored-by: Rainer 'rei' Schuth <rainer.schuth@digital-results-international.com>
1 parent 9df3747 commit 766c84c

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

charts/cronjobs/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v2
33
name: cronjobs
44
description: A generic helm cronjob chart for kubernetes
55
type: application
6-
version: 1.2.1
6+
version: 1.3.0
77
appVersion: latest
88
home: https://github.com/klicktipp/helm-charts
99
keywords:

charts/cronjobs/templates/cronjob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ spec:
8080
securityContext:
8181
{{- toYaml ($job.podSecurityContext | default $.Values.podSecurityContext) | nindent 12 }}
8282
containers:
83-
- name: job
83+
- name: {{ .containerName | default $.Values.commonContainerName }}
8484
securityContext:
8585
{{- toYaml ($job.securityContext | default $.Values.securityContext) | nindent 16 }}
8686
image: "{{ $job.image.repository }}:{{ $job.image.tag | default $.Chart.AppVersion }}"

charts/cronjobs/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ env: {}
4848

4949
jobs: {}
5050
# test:
51+
# containerName: cronjob
5152
# schedule: "*/5 * * * *"
5253
# command:
5354
# - /bin/sh
@@ -104,6 +105,10 @@ commonAnnotations: {}
104105
# Common labels to add to all resources. Evaluated as a template
105106
commonLabels: {}
106107

108+
# Given name given to the job container inside the Pod.
109+
# Can be oveeriden with .jobs.KEY.containerName
110+
commonContainerName: cronjob
111+
107112
podSecurityContext: {}
108113
# fsGroup: 2000
109114

0 commit comments

Comments
 (0)