Skip to content

Commit b206365

Browse files
committed
fix(helm): make webhook port configurable in Helm chart templates
1 parent 202a630 commit b206365

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ spec:
105105
{{- if .HasWebhooks }}
106106
{{ "{{- if .Values.webhook.enable }}" }}
107107
ports:
108-
- containerPort: 9443
108+
- containerPort: {{ "{{ .Values.webhook.port }}" }}
109109
name: webhook-server
110110
protocol: TCP
111111
{{ "{{- end }}" }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:
5757
ports:
5858
- port: 443
5959
protocol: TCP
60-
targetPort: 9443
60+
targetPort: {{ "{{ .Values.webhook.port }}" }}
6161
selector:
6262
control-plane: controller-manager
6363
{{` + "`" + `{{- end }}` + "`" + `}}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ metrics:
129129
# the edit command with the '--force' flag
130130
webhook:
131131
enable: true
132+
port: 9443
132133
{{ end }}
133134
# [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true
134135
prometheus:

0 commit comments

Comments
 (0)