Skip to content

Commit d03c162

Browse files
authored
Merge pull request #665 from Arakos/fix/helmchart
🐛 Remove metricsBindAddr from helmchart
2 parents 57fd624 + 9afb69c commit d03c162

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

hack/charts/cluster-api-operator/templates/deployment.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ spec:
6565
{{- if .Values.healthAddr }}
6666
- --health-addr={{ .Values.healthAddr }}
6767
{{- end }}
68-
{{- if .Values.metricsBindAddr }}
69-
- --metrics-bind-addr={{ .Values.metricsBindAddr }}
70-
{{- end }}
7168
{{- if .Values.diagnosticsAddress }}
7269
- --diagnostics-address={{ .Values.diagnosticsAddress }}
7370
{{- end }}
@@ -100,9 +97,15 @@ spec:
10097
- containerPort: 9443
10198
name: webhook-server
10299
protocol: TCP
103-
- containerPort: {{ ( split ":" $.Values.metricsBindAddr)._1 | int }}
100+
{{- if $.Values.diagnosticsAddress }}
101+
{{- $diagnosticsPort := $.Values.diagnosticsAddress }}
102+
{{- if contains ":" $diagnosticsPort -}}
103+
{{ $diagnosticsPort = ( split ":" $.Values.diagnosticsAddress)._1 | int }}
104+
{{- end }}
105+
- containerPort: {{ $diagnosticsPort | int }}
104106
name: metrics
105107
protocol: TCP
108+
{{- end }}
106109
{{- with .Values.resources.manager }}
107110
resources:
108111
{{- toYaml . | nindent 12 }}

hack/charts/cluster-api-operator/values.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ image:
2424
env:
2525
manager: []
2626
healthAddr: ":8081"
27-
metricsBindAddr: "127.0.0.1:8080"
28-
diagnosticsAddress: "8443"
27+
diagnosticsAddress: ":8443"
2928
insecureDiagnostics: false
3029
watchConfigSecret: false
3130
imagePullSecrets: {}

test/e2e/resources/full-chart-install.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28387,8 +28387,7 @@ spec:
2838728387
- args:
2838828388
- --v=2
2838928389
- --health-addr=:8081
28390-
- --metrics-bind-addr=127.0.0.1:8080
28391-
- --diagnostics-address=8443
28390+
- --diagnostics-address=:8443
2839228391
- --leader-elect=true
2839328392
command:
2839428393
- /manager
@@ -28399,7 +28398,7 @@ spec:
2839928398
- containerPort: 9443
2840028399
name: webhook-server
2840128400
protocol: TCP
28402-
- containerPort: 8080
28401+
- containerPort: 8443
2840328402
name: metrics
2840428403
protocol: TCP
2840528404
resources:

0 commit comments

Comments
 (0)