From 1eb8bdbdd36611bbdca1e7043ca8da54cc5e6053 Mon Sep 17 00:00:00 2001 From: Jim Fitzpatrick Date: Mon, 25 Sep 2023 11:45:49 +0100 Subject: [PATCH] Update dependencies/kustomization.yaml Allow the resources depending on the webook to be accessed using kudectl Co-authored-by: Guilherme Cassolato --- config/dependencies/kustomization.yaml | 75 ++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/config/dependencies/kustomization.yaml b/config/dependencies/kustomization.yaml index e8e37352d..46a7e82c0 100644 --- a/config/dependencies/kustomization.yaml +++ b/config/dependencies/kustomization.yaml @@ -7,3 +7,78 @@ resources: patchesStrategicMerge: - authorino/delete-ns.yaml - limitador/delete-ns.yaml + +replacements: +- source: + fieldPath: .metadata.namespace + group: cert-manager.io + kind: Certificate + name: authorino-webhook-server-cert + version: v1 + targets: + - fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + create: true + delimiter: / + select: + kind: CustomResourceDefinition + name: authconfigs.authorino.kuadrant.io +- source: + fieldPath: .metadata.name + group: cert-manager.io + kind: Certificate + name: authorino-webhook-server-cert + version: v1 + targets: + - fieldPaths: + - .metadata.annotations.[cert-manager.io/inject-ca-from] + options: + create: true + delimiter: / + index: 1 + select: + kind: CustomResourceDefinition + name: authconfigs.authorino.kuadrant.io +- source: + fieldPath: .metadata.name + kind: Service + name: authorino-webhooks + version: v1 + targets: + - fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + create: true + delimiter: . + select: + group: cert-manager.io + kind: Certificate + name: authorino-webhook-server-cert + version: v1 +- source: + fieldPath: .metadata.namespace + kind: Service + name: authorino-webhooks + version: v1 + targets: + - fieldPaths: + - .spec.dnsNames.0 + - .spec.dnsNames.1 + options: + create: true + delimiter: . + index: 1 + select: + group: cert-manager.io + kind: Certificate + name: authorino-webhook-server-cert + version: v1 + - fieldPaths: + - subjects.0.namespace + select: + group: rbac.authorization.k8s.io + kind: RoleBinding + name: authorino-webhooks-manager +