diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/infra_test.go b/control-plane-operator/controllers/hostedcontrolplane/infra/infra_test.go index 55d9b5f8c72..ce15e898b0c 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/infra_test.go +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/infra_test.go @@ -940,6 +940,9 @@ func TestReconcileOAuthService(t *testing.T) { Namespace: targetNamespace, Name: manifests.OauthServerService(targetNamespace).Name, OwnerReferences: []metav1.OwnerReference{ownerRef}, + Labels: map[string]string{ + "app": "oauth-openshift", + }, }, Spec: corev1.ServiceSpec{ Type: corev1.ServiceTypeClusterIP, diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress.yaml index be61f321699..c3a118186b9 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress.yaml @@ -95,6 +95,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -141,6 +143,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress_And_Swift.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress_And_Swift.yaml index b343e2bfb91..3a60693bdbd 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress_And_Swift.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_ARO_Route_SharedIngress_And_Swift.yaml @@ -119,6 +119,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -165,6 +167,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_KAS_LoadBalancer.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_KAS_LoadBalancer.yaml index 1805a99d8b0..75016e47a73 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_KAS_LoadBalancer.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_KAS_LoadBalancer.yaml @@ -76,6 +76,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -150,6 +152,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_Route.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_Route.yaml index efa811b16f6..431eb038341 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_Route.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Private_Route.yaml @@ -123,6 +123,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -171,6 +173,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_KAS_LoadBalancer.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_KAS_LoadBalancer.yaml index 0503c460833..e8724a1269f 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_KAS_LoadBalancer.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_KAS_LoadBalancer.yaml @@ -72,6 +72,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -147,6 +149,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_Route.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_Route.yaml index 5673253add2..feb2b347355 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_Route.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_PublicAndPrivate_Route.yaml @@ -119,6 +119,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -167,6 +169,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_KAS_LoadBalancer.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_KAS_LoadBalancer.yaml index e7da5726b7e..5951522583e 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_KAS_LoadBalancer.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_KAS_LoadBalancer.yaml @@ -46,6 +46,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -94,6 +96,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_Route.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_Route.yaml index 3f211b6b322..a0f28f0b869 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_Route.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_AWS_Public_Route.yaml @@ -95,6 +95,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -143,6 +145,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_KAS_LoadBalancer.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_KAS_LoadBalancer.yaml index e9e8a989002..493d4d31d97 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_KAS_LoadBalancer.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_KAS_LoadBalancer.yaml @@ -76,6 +76,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -146,6 +148,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_OAuth_LoadBalancer.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_OAuth_LoadBalancer.yaml index 600efaa52e2..1d0b40b6a7e 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_OAuth_LoadBalancer.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_Azure_Private_OAuth_LoadBalancer.yaml @@ -76,6 +76,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -124,6 +126,8 @@ services: - metadata: annotations: service.beta.kubernetes.io/azure-load-balancer-internal: "true" + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_When_Azure_self_managed_cluster_has_KAS_Route_with_hostname__it_should_need_an_external_router.yaml b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_When_Azure_self_managed_cluster_has_KAS_Route_with_hostname__it_should_need_an_external_router.yaml index cb76cd87d65..d7a6ed91d46 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_When_Azure_self_managed_cluster_has_KAS_Route_with_hostname__it_should_need_an_external_router.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/infra/testdata/zz_fixture_TestReconcileInfrastructure_When_Azure_self_managed_cluster_has_KAS_Route_with_hostname__it_should_need_an_external_router.yaml @@ -95,6 +95,8 @@ routes: services: items: - metadata: + labels: + app: konnectivity-server name: konnectivity-server namespace: test-namespace ownerReferences: @@ -141,6 +143,8 @@ services: status: loadBalancer: {} - metadata: + labels: + app: oauth-openshift name: oauth-openshift namespace: test-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/manifests/infra.go b/control-plane-operator/controllers/hostedcontrolplane/manifests/infra.go index 1f6da5cfdff..7bede07d955 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/manifests/infra.go +++ b/control-plane-operator/controllers/hostedcontrolplane/manifests/infra.go @@ -93,6 +93,9 @@ func OauthServerService(hostedClusterNamespace string) *corev1.Service { ObjectMeta: metav1.ObjectMeta{ Name: oauthServiceName, Namespace: hostedClusterNamespace, + Labels: map[string]string{ + "app": "oauth-openshift", + }, }, } } @@ -138,6 +141,9 @@ func KonnectivityServerService(hostedClusterNamespace string) *corev1.Service { ObjectMeta: metav1.ObjectMeta{ Name: konnectivityServerServiceName, Namespace: hostedClusterNamespace, + Labels: map[string]string{ + "app": "konnectivity-server", + }, }, } } diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/AROSwift/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/AROSwift/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml index abd05d51761..7538f6f7a0a 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/AROSwift/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/AROSwift/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Service metadata: + labels: + app: ignition-server name: ignition-server namespace: hcp-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/GCP/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/GCP/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml index abd05d51761..7538f6f7a0a 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/GCP/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/GCP/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Service metadata: + labels: + app: ignition-server name: ignition-server namespace: hcp-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/IBMCloud/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/IBMCloud/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml index abd05d51761..7538f6f7a0a 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/IBMCloud/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/IBMCloud/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Service metadata: + labels: + app: ignition-server name: ignition-server namespace: hcp-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml index abd05d51761..7538f6f7a0a 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/TechPreviewNoUpgrade/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Service metadata: + labels: + app: ignition-server name: ignition-server namespace: hcp-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml index abd05d51761..7538f6f7a0a 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/testdata/ignition-server/zz_fixture_TestControlPlaneComponents_ignition_server_service.yaml @@ -1,6 +1,8 @@ apiVersion: v1 kind: Service metadata: + labels: + app: ignition-server name: ignition-server namespace: hcp-namespace ownerReferences: diff --git a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/ignition-server/service.yaml b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/ignition-server/service.yaml index 318d7745363..11c207b47fc 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/v2/assets/ignition-server/service.yaml +++ b/control-plane-operator/controllers/hostedcontrolplane/v2/assets/ignition-server/service.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Service metadata: name: ignition-server + labels: + app: ignition-server spec: ports: - name: https