Skip to content

Commit

Permalink
[Cronjobs] improve labels fix (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Rainer 'rei' Schuth <rainer.schuth@digital-results-international.com>
  • Loading branch information
reixd and Rainer 'rei' Schuth authored May 22, 2024
1 parent 28161d0 commit 61cf969
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cronjobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: cronjobs
description: A generic helm cronjob chart for kubernetes
type: application
version: 1.2.0
version: 1.2.1
appVersion: latest
home: https://github.com/klicktipp/helm-charts
keywords:
Expand Down
1 change: 0 additions & 1 deletion charts/cronjobs/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
Selector labels
*/}}
{{- define "cronjobs.selectorLabels" -}}
app.kubernetes.io/name: {{ include "cronjobs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

Expand Down
2 changes: 2 additions & 0 deletions charts/cronjobs/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
{{- with $.Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
app.kubernetes.io/name: {{ $chart_name }}-{{ $JOB_NAME_SLUG }}
{{- include "cronjobs.labels" $ | nindent 4 }}
annotations:
{{- if $.commonAnnotations }}
Expand Down Expand Up @@ -56,6 +57,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ $chart_name }}-{{ $JOB_NAME_SLUG }}
{{- with $.Values.commonLabels }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down

0 comments on commit 61cf969

Please sign in to comment.