From 973fef9d872adbeb96c0fd7a1f4d043e23e3130e Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta Date: Mon, 9 Sep 2024 21:40:13 +0300 Subject: [PATCH] Webhook config cleanup (#1200) * webhook: remove autogenerated misleading labels Autogenerated Service contains labels which do no correspond existing ones: app.kubernetes.io/name: service app.kubernetes.io/instance: webhook-service app.kubernetes.io/component: webhook Remove from both kustomize and bundle manifests. Credits-To: Wen Zhou Signed-off-by: Yauheni Kaliuta * webhook: remove MutatingWebhookConfiguration references from kustomization There is only Validating webhook. Credits-To: Wen Zhou Signed-off-by: Yauheni Kaliuta --------- Signed-off-by: Yauheni Kaliuta --- .../opendatahub-operator-webhook-service_v1_service.yaml | 3 --- config/webhook/kustomizeconfig.yaml | 7 ------- config/webhook/service.yaml | 4 ---- 3 files changed, 14 deletions(-) diff --git a/bundle/manifests/opendatahub-operator-webhook-service_v1_service.yaml b/bundle/manifests/opendatahub-operator-webhook-service_v1_service.yaml index 71d4a49d17d..a3b1df4b380 100644 --- a/bundle/manifests/opendatahub-operator-webhook-service_v1_service.yaml +++ b/bundle/manifests/opendatahub-operator-webhook-service_v1_service.yaml @@ -6,11 +6,8 @@ metadata: service.beta.openshift.io/serving-cert-secret-name: opendatahub-operator-controller-webhook-cert creationTimestamp: null labels: - app.kubernetes.io/component: webhook app.kubernetes.io/created-by: opendatahub-operator - app.kubernetes.io/instance: webhook-service app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/name: service app.kubernetes.io/part-of: opendatahub-operator name: opendatahub-operator-webhook-service spec: diff --git a/config/webhook/kustomizeconfig.yaml b/config/webhook/kustomizeconfig.yaml index 25e21e3c963..e809f78208e 100644 --- a/config/webhook/kustomizeconfig.yaml +++ b/config/webhook/kustomizeconfig.yaml @@ -4,18 +4,11 @@ nameReference: - kind: Service version: v1 fieldSpecs: - - kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/name - kind: ValidatingWebhookConfiguration group: admissionregistration.k8s.io path: webhooks/clientConfig/service/name namespace: -- kind: MutatingWebhookConfiguration - group: admissionregistration.k8s.io - path: webhooks/clientConfig/service/namespace - create: true - kind: ValidatingWebhookConfiguration group: admissionregistration.k8s.io path: webhooks/clientConfig/service/namespace diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml index 4f62377f651..5b5dd12504c 100644 --- a/config/webhook/service.yaml +++ b/config/webhook/service.yaml @@ -1,11 +1,7 @@ - apiVersion: v1 kind: Service metadata: labels: - app.kubernetes.io/name: service - app.kubernetes.io/instance: webhook-service - app.kubernetes.io/component: webhook app.kubernetes.io/created-by: opendatahub-operator app.kubernetes.io/part-of: opendatahub-operator app.kubernetes.io/managed-by: kustomize