Skip to content

Commit

Permalink
Merge pull request #63 from patrickegli/main
Browse files Browse the repository at this point in the history
Bugfix: Include custom labels in deployment pod template
  • Loading branch information
thecampagnards committed Aug 15, 2023
2 parents f2273ff + b0920bc commit 2c2bc56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions charts/camunda-bpm-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,11 @@ Common labels
{{- define "camunda-bpm-platform.labels" -}}
helm.sh/chart: {{ include "camunda-bpm-platform.chart" . }}
{{ include "camunda-bpm-platform.selectorLabels" . }}
{{ include "camunda-bpm-platform.customLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{- range $key, $val := .Values.commonLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Expand All @@ -55,6 +51,17 @@ app.kubernetes.io/name: {{ include "camunda-bpm-platform.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Custom labels
*/}}
{{- define "camunda-bpm-platform.customLabels" -}}
{{- if .Values.commonLabels }}
{{- range $key, $val := .Values.commonLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
1 change: 1 addition & 0 deletions charts/camunda-bpm-platform/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ spec:
{{- end }}
labels:
{{- include "camunda-bpm-platform.selectorLabels" . | nindent 8 }}
{{- include "camunda-bpm-platform.customLabels" . | nindent 8 }}
spec:
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion charts/camunda-bpm-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ annotations: {}
# Custom labels to add to all deployed objects
commonLabels: {}
# Example
# my-custom-annotation: my-value
# my-custom-label: my-value

image:
repository: camunda/camunda-bpm-platform
Expand Down

0 comments on commit 2c2bc56

Please sign in to comment.