diff --git a/cmd/manager/main.go b/cmd/manager/main.go index 010855524..13b54852e 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -103,7 +103,7 @@ func main() { caCertDir string globalPullSecret string ) - flag.StringVar(&metricsAddr, "metrics-bind-address", "", "The address for the metrics endpoint. Requires tls-cert and tls-key. (Default: ':8443')") + flag.StringVar(&metricsAddr, "metrics-bind-address", "", "The address for the metrics endpoint. Requires tls-cert and tls-key. (Default: ':8445')") flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") flag.StringVar(&caCertDir, "ca-certs-dir", "", "The directory of TLS certificate to use for verifying HTTPS connections to the Catalogd and docker-registry web servers.") flag.StringVar(&certFile, "tls-cert", "", "The certificate file used for the metrics server. Required to enable the metrics server. Requires tls-key.") @@ -138,7 +138,7 @@ func main() { } if certFile != "" && keyFile != "" && metricsAddr == "" { - metricsAddr = ":8443" + metricsAddr = ":8445" } ctrl.SetLogger(textlogger.NewLogger(textlogger.NewConfig())) diff --git a/config/base/manager/manager.yaml b/config/base/manager/manager.yaml index 12bd673a0..47ffbef64 100644 --- a/config/base/manager/manager.yaml +++ b/config/base/manager/manager.yaml @@ -52,7 +52,7 @@ spec: - /manager args: - "--health-probe-bind-address=:8081" - - "--metrics-bind-address=:8443" + - "--metrics-bind-address=:8445" - "--leader-elect" image: controller:latest imagePullPolicy: IfNotPresent diff --git a/config/base/rbac/auth_proxy_service.yaml b/config/base/rbac/auth_proxy_service.yaml index 11f4cfc6f..bc2400154 100644 --- a/config/base/rbac/auth_proxy_service.yaml +++ b/config/base/rbac/auth_proxy_service.yaml @@ -8,8 +8,8 @@ metadata: spec: ports: - name: https - port: 8443 + port: 8445 protocol: TCP - targetPort: 8443 + targetPort: 8445 selector: control-plane: operator-controller-controller-manager diff --git a/test/e2e/metrics_test.go b/test/e2e/metrics_test.go index 7d730af7a..1132bb5a3 100644 --- a/test/e2e/metrics_test.go +++ b/test/e2e/metrics_test.go @@ -98,7 +98,7 @@ func TestOperatorControllerMetricsExportedEndpoint(t *testing.T) { require.NoError(t, waitErr, "Error waiting for curl pod to be ready: %s", string(waitOutput)) t.Log("Validating the metrics endpoint") - metricsURL := "https://operator-controller-controller-manager-metrics-service." + namespace + ".svc.cluster.local:8443/metrics" + metricsURL := "https://operator-controller-controller-manager-metrics-service." + namespace + ".svc.cluster.local:8445/metrics" curlCmd := exec.Command(client, "exec", curlPod, "-n", namespace, "--", "curl", "-v", "-k", "-H", "Authorization: Bearer "+token, metricsURL) output, err = curlCmd.CombinedOutput()