Skip to content

Commit 8ec703e

Browse files
authored
Merge pull request #4373 from monteiro-renato/patch-8
✨ feat: (helm/v1alpha1): Allow extra pod labels to be configured
2 parents 5bc4815 + 21a648a commit 8ec703e

File tree

2 files changed

+10
-0
lines changed
  • pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager
  • testdata/project-v4-with-plugins/dist/chart/templates/manager

2 files changed

+10
-0
lines changed

pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager/manager.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ spec:
7575
labels:
7676
{{ "{{- include \"chart.labels\" . | nindent 8 }}" }}
7777
control-plane: controller-manager
78+
{{ "{{- if and .Values.controllerManager.pod .Values.controllerManager.pod.labels }}" }}
79+
{{ "{{- range $key, $value := .Values.controllerManager.pod.labels }}" }}
80+
{{ "{{ $key }}" }}: {{ "{{ $value }}" }}
81+
{{ "{{- end }}" }}
82+
{{ "{{- end }}" }}
7883
spec:
7984
containers:
8085
- name: manager

testdata/project-v4-with-plugins/dist/chart/templates/manager/manager.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ spec:
1919
labels:
2020
{{- include "chart.labels" . | nindent 8 }}
2121
control-plane: controller-manager
22+
{{- if and .Values.controllerManager.pod .Values.controllerManager.pod.labels }}
23+
{{- range $key, $value := .Values.controllerManager.pod.labels }}
24+
{{ $key }}: {{ $value }}
25+
{{- end }}
26+
{{- end }}
2227
spec:
2328
containers:
2429
- name: manager

0 commit comments

Comments
 (0)