diff --git a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager/manager.go b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager/manager.go index 603ff8d39f6..1d0f99b0c3c 100644 --- a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager/manager.go +++ b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/chart-templates/manager/manager.go @@ -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 }}" }} diff --git a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/values.go b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/values.go index d3a533411fa..764900f7814 100644 --- a/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/values.go +++ b/pkg/plugins/optional/helm/v1alpha/scaffolds/internal/templates/values.go @@ -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 args: - "--leader-elect" - "--metrics-bind-address=:8443" @@ -128,7 +128,7 @@ metrics: {{ if .Webhooks }} # [WEBHOOKS]: Webhooks configuration # The following configuration is automatically generated from the manifests -# generated by controller-gen. To update run 'make manifests' and +# generated by controller-gen. To update run 'make manifests' and # the edit command with the '--force' flag webhook: enable: true diff --git a/testdata/project-v4-with-plugins/dist/chart/templates/manager/manager.yaml b/testdata/project-v4-with-plugins/dist/chart/templates/manager/manager.yaml index 7c72f4d8e58..30e925014be 100644 --- a/testdata/project-v4-with-plugins/dist/chart/templates/manager/manager.yaml +++ b/testdata/project-v4-with-plugins/dist/chart/templates/manager/manager.yaml @@ -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 }} diff --git a/testdata/project-v4-with-plugins/dist/chart/values.yaml b/testdata/project-v4-with-plugins/dist/chart/values.yaml index 7e928bd3e50..5e9b98e16b5 100644 --- a/testdata/project-v4-with-plugins/dist/chart/values.yaml +++ b/testdata/project-v4-with-plugins/dist/chart/values.yaml @@ -1,10 +1,10 @@ # [MANAGER]: Manager Deployment Configurations controllerManager: + replicas: 1 container: image: repository: controller tag: latest - replicas: 1 args: - "--leader-elect" - "--metrics-bind-address=:8443" @@ -68,7 +68,7 @@ metrics: # [WEBHOOKS]: Webhooks configuration # The following configuration is automatically generated from the manifests -# generated by controller-gen. To update run 'make manifests' and +# generated by controller-gen. To update run 'make manifests' and # the edit command with the '--force' flag webhook: enable: true