Skip to content

Commit

Permalink
Webhook config cleanup (#1200)
Browse files Browse the repository at this point in the history
* 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 <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

* webhook: remove MutatingWebhookConfiguration references from kustomization

There is only Validating webhook.

Credits-To:  Wen Zhou <wenzhou@redhat.com>

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>

---------

Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
  • Loading branch information
ykaliuta authored Sep 9, 2024
1 parent b886de9 commit 973fef9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 0 additions & 7 deletions config/webhook/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions config/webhook/service.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 973fef9

Please sign in to comment.