Skip to content

Commit 1ab2d91

Browse files
authored
Merge pull request #4356 from monteiro-renato/monteiro-renato-patch-1
🐛 fix: (helm/v1alpha1): add missing replicas field to the Deployment generated
2 parents da87b6b + da3f8de commit 1ab2d91

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ metadata:
6363
{{ "{{- include \"chart.labels\" . | nindent 4 }}" }}
6464
control-plane: controller-manager
6565
spec:
66+
replicas: {{ "{{ .Values.controllerManager.replicas }}" }}
6667
selector:
6768
matchLabels:
6869
{{ "{{- include \"chart.selectorLabels\" . | nindent 6 }}" }}

pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/values.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ func (f *HelmValues) SetTemplateDefaults() error {
5757

5858
const helmValuesTemplate = `# [MANAGER]: Manager Deployment Configurations
5959
controllerManager:
60+
replicas: 1
6061
container:
6162
image:
6263
repository: controller
6364
tag: latest
64-
replicas: 1
6565
args:
6666
- "--leader-elect"
6767
- "--metrics-bind-address=:8443"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
{{- include "chart.labels" . | nindent 4 }}
88
control-plane: controller-manager
99
spec:
10+
replicas: {{ .Values.controllerManager.replicas }}
1011
selector:
1112
matchLabels:
1213
{{- include "chart.selectorLabels" . | nindent 6 }}

testdata/project-v4-with-plugins/dist/chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [MANAGER]: Manager Deployment Configurations
22
controllerManager:
3+
replicas: 1
34
container:
45
image:
56
repository: controller
67
tag: latest
7-
replicas: 1
88
args:
99
- "--leader-elect"
1010
- "--metrics-bind-address=:8443"

0 commit comments

Comments
 (0)