From 67026983377d932ac65709ceee49602aca723839 Mon Sep 17 00:00:00 2001 From: Joe Lanford Date: Mon, 6 Jan 2025 10:49:06 -0500 Subject: [PATCH] move service to kustomize manager dir, rename for general purpose use Signed-off-by: Joe Lanford --- config/base/manager/kustomization.yaml | 9 ++++++--- .../auth_proxy_service.yaml => manager/service.yaml} | 4 ++-- config/base/rbac/kustomization.yaml | 1 - config/components/tls/resources/manager_cert.yaml | 6 ++---- test/e2e/metrics_test.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) rename config/base/{rbac/auth_proxy_service.yaml => manager/service.yaml} (86%) diff --git a/config/base/manager/kustomization.yaml b/config/base/manager/kustomization.yaml index 28e97824fe..c4dc2112c3 100644 --- a/config/base/manager/kustomization.yaml +++ b/config/base/manager/kustomization.yaml @@ -1,8 +1,11 @@ -resources: -- manager.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + +resources: +- manager.yaml +- service.yaml + images: - name: controller newName: quay.io/operator-framework/operator-controller - newTag: devel \ No newline at end of file + newTag: devel diff --git a/config/base/rbac/auth_proxy_service.yaml b/config/base/manager/service.yaml similarity index 86% rename from config/base/rbac/auth_proxy_service.yaml rename to config/base/manager/service.yaml index 11f4cfc6f7..b352a0aa1b 100644 --- a/config/base/rbac/auth_proxy_service.yaml +++ b/config/base/manager/service.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: Service metadata: + name: service + namespace: system labels: control-plane: operator-controller-controller-manager - name: controller-manager-metrics-service - namespace: system spec: ports: - name: https diff --git a/config/base/rbac/kustomization.yaml b/config/base/rbac/kustomization.yaml index 1736277f39..c7b71aeedd 100644 --- a/config/base/rbac/kustomization.yaml +++ b/config/base/rbac/kustomization.yaml @@ -23,7 +23,6 @@ resources: # can access the metrics endpoint. Comment the following # permissions if you want to disable this protection. # More info: https://book.kubebuilder.io/reference/metrics.html -- auth_proxy_service.yaml - auth_proxy_role.yaml - auth_proxy_role_binding.yaml - auth_proxy_client_clusterrole.yaml diff --git a/config/components/tls/resources/manager_cert.yaml b/config/components/tls/resources/manager_cert.yaml index 2c3ee8b17b..96f131b7e2 100644 --- a/config/components/tls/resources/manager_cert.yaml +++ b/config/components/tls/resources/manager_cert.yaml @@ -5,10 +5,8 @@ metadata: spec: secretName: olmv1-cert dnsNames: - - operator-controller.olmv1-system.svc - - operator-controller.olmv1-system.svc.cluster.local - - operator-controller-controller-manager-metrics-service.olmv1-system.svc - - operator-controller-controller-manager-metrics-service.olmv1-system.svc.cluster.local + - operator-controller-service.olmv1-system.svc + - operator-controller-service.olmv1-system.svc.cluster.local privateKey: algorithm: ECDSA size: 256 diff --git a/test/e2e/metrics_test.go b/test/e2e/metrics_test.go index 7d730af7a5..72e38d3eac 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-service." + namespace + ".svc.cluster.local:8443/metrics" curlCmd := exec.Command(client, "exec", curlPod, "-n", namespace, "--", "curl", "-v", "-k", "-H", "Authorization: Bearer "+token, metricsURL) output, err = curlCmd.CombinedOutput()