diff --git a/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go b/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go index 6324e028c15..57e88d4a58f 100644 --- a/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go +++ b/pkg/plugins/common/kustomize/v2/scaffolds/webhook.go @@ -18,6 +18,7 @@ package scaffolds import ( "fmt" + pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" log "github.com/sirupsen/logrus" diff --git a/testdata/project-v4-multigroup-with-deploy-image/config/crd/kustomization.yaml b/testdata/project-v4-multigroup-with-deploy-image/config/crd/kustomization.yaml index 9b25692779d..51fa2481343 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/config/crd/kustomization.yaml +++ b/testdata/project-v4-multigroup-with-deploy-image/config/crd/kustomization.yaml @@ -17,11 +17,11 @@ resources: patches: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -#- path: patches/webhook_in_crew_captains.yaml -#- path: patches/webhook_in_ship_frigates.yaml -#- path: patches/webhook_in_ship_destroyers.yaml -#- path: patches/webhook_in_ship_cruisers.yaml -#- path: patches/webhook_in_sea-creatures_krakens.yaml +- path: patches/webhook_in_crew_captains.yaml +- path: patches/webhook_in_ship_frigates.yaml +- path: patches/webhook_in_ship_destroyers.yaml +- path: patches/webhook_in_ship_cruisers.yaml +- path: patches/webhook_in_sea-creatures_krakens.yaml #- path: patches/webhook_in_sea-creatures_leviathans.yaml #- path: patches/webhook_in_foo.policy_healthcheckpolicies.yaml #- path: patches/webhook_in_foo_bars.yaml diff --git a/testdata/project-v4-multigroup-with-deploy-image/config/default/kustomization.yaml b/testdata/project-v4-multigroup-with-deploy-image/config/default/kustomization.yaml index f54da704bcb..8027afebe13 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/config/default/kustomization.yaml +++ b/testdata/project-v4-multigroup-with-deploy-image/config/default/kustomization.yaml @@ -20,7 +20,7 @@ resources: - ../manager # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml -#- ../webhook +- ../webhook # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. #- ../certmanager # [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. @@ -34,7 +34,7 @@ patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml -#- manager_webhook_patch.yaml +- manager_webhook_patch.yaml # [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. # Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. diff --git a/testdata/project-v4-multigroup/config/crd/kustomization.yaml b/testdata/project-v4-multigroup/config/crd/kustomization.yaml index 221a80a6b82..51fa2481343 100644 --- a/testdata/project-v4-multigroup/config/crd/kustomization.yaml +++ b/testdata/project-v4-multigroup/config/crd/kustomization.yaml @@ -22,7 +22,7 @@ patches: - path: patches/webhook_in_ship_destroyers.yaml - path: patches/webhook_in_ship_cruisers.yaml - path: patches/webhook_in_sea-creatures_krakens.yaml -- path: patches/webhook_in_sea-creatures_leviathans.yaml +#- path: patches/webhook_in_sea-creatures_leviathans.yaml #- path: patches/webhook_in_foo.policy_healthcheckpolicies.yaml #- path: patches/webhook_in_foo_bars.yaml #- path: patches/webhook_in_fiz_bars.yaml