Skip to content

Commit d2e337c

Browse files
committed
make generate
1 parent 2f27c36 commit d2e337c

File tree

20 files changed

+47
-18
lines changed

20 files changed

+47
-18
lines changed

docs/book/src/cronjob-tutorial/testdata/project/cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func main() {
7979
var metricsAddr string
8080
var metricsCertPath, metricsCertName, metricsCertKey string
8181
var webhookCertPath, webhookCertName, webhookCertKey string
82+
var webhookPort int
8283
var enableLeaderElection bool
8384
var probeAddr string
8485
var secureMetrics bool
@@ -95,6 +96,7 @@ func main() {
9596
flag.StringVar(&webhookCertPath, "webhook-cert-path", "", "The directory that contains the webhook certificate.")
9697
flag.StringVar(&webhookCertName, "webhook-cert-name", "tls.crt", "The name of the webhook certificate file.")
9798
flag.StringVar(&webhookCertKey, "webhook-cert-key", "tls.key", "The name of the webhook key file.")
99+
flag.IntVar(&webhookPort, "webhook-port", 9443, "The port that the webhook endpoint binds to.")
98100
flag.StringVar(&metricsCertPath, "metrics-cert-path", "",
99101
"The directory that contains the metrics server certificate.")
100102
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
@@ -151,6 +153,7 @@ func main() {
151153

152154
webhookServer := webhook.NewServer(webhook.Options{
153155
TLSOpts: webhookTLSOpts,
156+
Port: webhookPort,
154157
})
155158

156159
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.

docs/book/src/cronjob-tutorial/testdata/project/dist/chart/templates/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
{{- toYaml .Values.controllerManager.container.readinessProbe | nindent 12 }}
4848
{{- if .Values.webhook.enable }}
4949
ports:
50-
- containerPort: 9443
50+
- containerPort: {{ .Values.webhook.port }}
5151
name: webhook-server
5252
protocol: TCP
5353
{{- end }}

docs/book/src/cronjob-tutorial/testdata/project/dist/chart/templates/metrics/metrics-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ metadata:
99
control-plane: controller-manager
1010
spec:
1111
ports:
12-
- port: 8443
13-
targetPort: 8443
12+
- port: {{ .Values.metrics.port }}
13+
targetPort: {{ .Values.metrics.port }}
1414
protocol: TCP
1515
name: https
1616
selector:

docs/book/src/cronjob-tutorial/testdata/project/dist/chart/templates/webhook/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
ports:
1111
- port: 443
1212
protocol: TCP
13-
targetPort: 9443
13+
targetPort: {{ .Values.webhook.port }}
1414
selector:
1515
control-plane: controller-manager
1616
{{- end }}

docs/book/src/cronjob-tutorial/testdata/project/dist/chart/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ controllerManager:
77
tag: latest
88
args:
99
- "--leader-elect"
10-
- "--metrics-bind-address=:8443"
10+
- "--metrics-bind-address=:{{ .Values.metrics.port }}"
1111
- "--health-probe-bind-address=:8081"
12+
- "--webhook-port={{ .Values.webhook.port }}"
1213
resources:
1314
limits:
1415
cpu: 500m
@@ -62,13 +63,15 @@ crd:
6263
# ControllerManager argument "--metrics-bind-address=:8443" is removed.
6364
metrics:
6465
enable: true
66+
port: 8443
6567

6668
# [WEBHOOKS]: Webhooks configuration
6769
# The following configuration is automatically generated from the manifests
6870
# generated by controller-gen. To update run 'make manifests' and
6971
# the edit command with the '--force' flag
7072
webhook:
7173
enable: true
74+
port: 9443
7275

7376
# [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true
7477
prometheus:

docs/book/src/getting-started/testdata/project/cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func main() {
5959
var metricsAddr string
6060
var metricsCertPath, metricsCertName, metricsCertKey string
6161
var webhookCertPath, webhookCertName, webhookCertKey string
62+
var webhookPort int
6263
var enableLeaderElection bool
6364
var probeAddr string
6465
var secureMetrics bool
@@ -75,6 +76,7 @@ func main() {
7576
flag.StringVar(&webhookCertPath, "webhook-cert-path", "", "The directory that contains the webhook certificate.")
7677
flag.StringVar(&webhookCertName, "webhook-cert-name", "tls.crt", "The name of the webhook certificate file.")
7778
flag.StringVar(&webhookCertKey, "webhook-cert-key", "tls.key", "The name of the webhook key file.")
79+
flag.IntVar(&webhookPort, "webhook-port", 9443, "The port that the webhook endpoint binds to.")
7880
flag.StringVar(&metricsCertPath, "metrics-cert-path", "",
7981
"The directory that contains the metrics server certificate.")
8082
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
@@ -131,6 +133,7 @@ func main() {
131133

132134
webhookServer := webhook.NewServer(webhook.Options{
133135
TLSOpts: webhookTLSOpts,
136+
Port: webhookPort,
134137
})
135138

136139
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.

docs/book/src/getting-started/testdata/project/dist/chart/templates/metrics/metrics-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ metadata:
99
control-plane: controller-manager
1010
spec:
1111
ports:
12-
- port: 8443
13-
targetPort: 8443
12+
- port: {{ .Values.metrics.port }}
13+
targetPort: {{ .Values.metrics.port }}
1414
protocol: TCP
1515
name: https
1616
selector:

docs/book/src/getting-started/testdata/project/dist/chart/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ controllerManager:
77
tag: latest
88
args:
99
- "--leader-elect"
10-
- "--metrics-bind-address=:8443"
10+
- "--metrics-bind-address=:{{ .Values.metrics.port }}"
1111
- "--health-probe-bind-address=:8081"
12+
- "--webhook-port={{ .Values.webhook.port }}"
1213
resources:
1314
limits:
1415
cpu: 500m
@@ -62,6 +63,7 @@ crd:
6263
# ControllerManager argument "--metrics-bind-address=:8443" is removed.
6364
metrics:
6465
enable: true
66+
port: 8443
6567

6668
# [PROMETHEUS]: To enable a ServiceMonitor to export metrics to Prometheus set true
6769
prometheus:

docs/book/src/multiversion-tutorial/testdata/project/cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func main() {
7878
var metricsAddr string
7979
var metricsCertPath, metricsCertName, metricsCertKey string
8080
var webhookCertPath, webhookCertName, webhookCertKey string
81+
var webhookPort int
8182
var enableLeaderElection bool
8283
var probeAddr string
8384
var secureMetrics bool
@@ -94,6 +95,7 @@ func main() {
9495
flag.StringVar(&webhookCertPath, "webhook-cert-path", "", "The directory that contains the webhook certificate.")
9596
flag.StringVar(&webhookCertName, "webhook-cert-name", "tls.crt", "The name of the webhook certificate file.")
9697
flag.StringVar(&webhookCertKey, "webhook-cert-key", "tls.key", "The name of the webhook key file.")
98+
flag.IntVar(&webhookPort, "webhook-port", 9443, "The port that the webhook endpoint binds to.")
9799
flag.StringVar(&metricsCertPath, "metrics-cert-path", "",
98100
"The directory that contains the metrics server certificate.")
99101
flag.StringVar(&metricsCertName, "metrics-cert-name", "tls.crt", "The name of the metrics server certificate file.")
@@ -150,6 +152,7 @@ func main() {
150152

151153
webhookServer := webhook.NewServer(webhook.Options{
152154
TLSOpts: webhookTLSOpts,
155+
Port: webhookPort,
153156
})
154157

155158
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.

docs/book/src/multiversion-tutorial/testdata/project/dist/chart/templates/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
{{- toYaml .Values.controllerManager.container.readinessProbe | nindent 12 }}
4848
{{- if .Values.webhook.enable }}
4949
ports:
50-
- containerPort: 9443
50+
- containerPort: {{ .Values.webhook.port }}
5151
name: webhook-server
5252
protocol: TCP
5353
{{- end }}

0 commit comments

Comments
 (0)