Skip to content

Commit

Permalink
🐛 fix: add missing replicas field to the Deployment generated by the …
Browse files Browse the repository at this point in the history
…Helm plugin
  • Loading branch information
monteiro-renato committed Nov 21, 2024
1 parent e07823e commit db6764d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ metadata:
{{ "{{- include \"chart.labels\" . | nindent 4 }}" }}
control-plane: controller-manager
spec:
replicas: {{ "{{ .Values.controllerManager.replicas }}" }}
selector:
matchLabels:
{{ "{{- include \"chart.selectorLabels\" . | nindent 6 }}" }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ func (f *HelmValues) SetTemplateDefaults() error {

const helmValuesTemplate = `# [MANAGER]: Manager Deployment Configurations
controllerManager:
replicas: 1
container:
image:
repository: controller
tag: latest
replicas: 1
tag: latest
args:
- "--leader-elect"
- "--metrics-bind-address=:8443"
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v4-multigroup/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup
go 1.22.0

require (
github.com/cert-manager/cert-manager v1.16.1
github.com/cert-manager/cert-manager v1.16.2
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
k8s.io/api v0.31.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
{{- include "chart.labels" . | nindent 4 }}
control-plane: controller-manager
spec:
replicas: {{ .Values.controllerManager.replicas }}
selector:
matchLabels:
{{- include "chart.selectorLabels" . | nindent 6 }}
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v4-with-plugins/dist/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# [MANAGER]: Manager Deployment Configurations
controllerManager:
replicas: 1
container:
image:
repository: controller
tag: latest
replicas: 1
tag: latest
args:
- "--leader-elect"
- "--metrics-bind-address=:8443"
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v4/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module sigs.k8s.io/kubebuilder/testdata/project-v4
go 1.22.0

require (
github.com/cert-manager/cert-manager v1.16.1
github.com/cert-manager/cert-manager v1.16.2
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
k8s.io/api v0.31.1
Expand Down

0 comments on commit db6764d

Please sign in to comment.