diff --git a/hack/charts/cluster-api-operator/templates/deployment.yaml b/hack/charts/cluster-api-operator/templates/deployment.yaml index 6f06700d6..a0c314777 100644 --- a/hack/charts/cluster-api-operator/templates/deployment.yaml +++ b/hack/charts/cluster-api-operator/templates/deployment.yaml @@ -65,9 +65,6 @@ spec: {{- if .Values.healthAddr }} - --health-addr={{ .Values.healthAddr }} {{- end }} - {{- if .Values.metricsBindAddr }} - - --metrics-bind-addr={{ .Values.metricsBindAddr }} - {{- end }} {{- if .Values.diagnosticsAddress }} - --diagnostics-address={{ .Values.diagnosticsAddress }} {{- end }} @@ -100,9 +97,15 @@ spec: - containerPort: 9443 name: webhook-server protocol: TCP - - containerPort: {{ ( split ":" $.Values.metricsBindAddr)._1 | int }} + {{- if $.Values.diagnosticsAddress }} + {{- $diagnosticsPort := $.Values.diagnosticsAddress }} + {{- if contains ":" $diagnosticsPort -}} + {{ $diagnosticsPort = ( split ":" $.Values.diagnosticsAddress)._1 | int }} + {{- end }} + - containerPort: {{ $diagnosticsPort | int }} name: metrics protocol: TCP + {{- end }} {{- with .Values.resources.manager }} resources: {{- toYaml . | nindent 12 }} diff --git a/hack/charts/cluster-api-operator/values.yaml b/hack/charts/cluster-api-operator/values.yaml index 1d2fb0cc5..7038e9b6a 100644 --- a/hack/charts/cluster-api-operator/values.yaml +++ b/hack/charts/cluster-api-operator/values.yaml @@ -24,8 +24,7 @@ image: env: manager: [] healthAddr: ":8081" -metricsBindAddr: "127.0.0.1:8080" -diagnosticsAddress: "8443" +diagnosticsAddress: ":8443" insecureDiagnostics: false watchConfigSecret: false imagePullSecrets: {} diff --git a/test/e2e/resources/full-chart-install.yaml b/test/e2e/resources/full-chart-install.yaml index 35df0568b..f51b00826 100644 --- a/test/e2e/resources/full-chart-install.yaml +++ b/test/e2e/resources/full-chart-install.yaml @@ -28387,8 +28387,7 @@ spec: - args: - --v=2 - --health-addr=:8081 - - --metrics-bind-addr=127.0.0.1:8080 - - --diagnostics-address=8443 + - --diagnostics-address=:8443 - --leader-elect=true command: - /manager @@ -28399,7 +28398,7 @@ spec: - containerPort: 9443 name: webhook-server protocol: TCP - - containerPort: 8080 + - containerPort: 8443 name: metrics protocol: TCP resources: