diff --git a/pkg/cli/alpha/config-gen/cert-generation-filter.go b/pkg/cli/alpha/config-gen/cert-generation-filter.go index 1f167a90a99..da1a2fe23bd 100644 --- a/pkg/cli/alpha/config-gen/cert-generation-filter.go +++ b/pkg/cli/alpha/config-gen/cert-generation-filter.go @@ -38,6 +38,7 @@ type CertFilter struct { } // Filter implements kio.Filter +// TODO: when v1 CRDs are supported, scaffold conversion webhook versions. func (c CertFilter) Filter(input []*yaml.RNode) ([]*yaml.RNode, error) { if c.Spec.Webhooks.CertificateSource.Type != "dev" { diff --git a/pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go b/pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go index 1bf0e7ac071..61f41a02c27 100644 --- a/pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go +++ b/pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go @@ -66,5 +66,7 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - {{ .Resource.API.CRDVersion }} {{- end }} ` diff --git a/testdata/project-v3-addon/config/crd/patches/webhook_in_admirals.yaml b/testdata/project-v3-addon/config/crd/patches/webhook_in_admirals.yaml index e7cef4898e3..0ce2808578a 100644 --- a/testdata/project-v3-addon/config/crd/patches/webhook_in_admirals.yaml +++ b/testdata/project-v3-addon/config/crd/patches/webhook_in_admirals.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-addon/config/crd/patches/webhook_in_captains.yaml b/testdata/project-v3-addon/config/crd/patches/webhook_in_captains.yaml index 39ef2528c5a..f73ae2e8abc 100644 --- a/testdata/project-v3-addon/config/crd/patches/webhook_in_captains.yaml +++ b/testdata/project-v3-addon/config/crd/patches/webhook_in_captains.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-addon/config/crd/patches/webhook_in_firstmates.yaml b/testdata/project-v3-addon/config/crd/patches/webhook_in_firstmates.yaml index a644d053242..76ee5acedbd 100644 --- a/testdata/project-v3-addon/config/crd/patches/webhook_in_firstmates.yaml +++ b/testdata/project-v3-addon/config/crd/patches/webhook_in_firstmates.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-config/config/crd/patches/webhook_in_admirals.yaml b/testdata/project-v3-config/config/crd/patches/webhook_in_admirals.yaml index e7cef4898e3..0ce2808578a 100644 --- a/testdata/project-v3-config/config/crd/patches/webhook_in_admirals.yaml +++ b/testdata/project-v3-config/config/crd/patches/webhook_in_admirals.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-config/config/crd/patches/webhook_in_captains.yaml b/testdata/project-v3-config/config/crd/patches/webhook_in_captains.yaml index 39ef2528c5a..f73ae2e8abc 100644 --- a/testdata/project-v3-config/config/crd/patches/webhook_in_captains.yaml +++ b/testdata/project-v3-config/config/crd/patches/webhook_in_captains.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-config/config/crd/patches/webhook_in_firstmates.yaml b/testdata/project-v3-config/config/crd/patches/webhook_in_firstmates.yaml index a644d053242..76ee5acedbd 100644 --- a/testdata/project-v3-config/config/crd/patches/webhook_in_firstmates.yaml +++ b/testdata/project-v3-config/config/crd/patches/webhook_in_firstmates.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_captains.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_captains.yaml index 39ef2528c5a..f73ae2e8abc 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_captains.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_captains.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_cruisers.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_cruisers.yaml index 3d6f07a0d48..99b6b6741b6 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_cruisers.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_cruisers.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_destroyers.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_destroyers.yaml index 79115951424..0e0095cb3a6 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_destroyers.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_destroyers.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_frigates.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_frigates.yaml index 19cd37cd6b2..cdc5078ae71 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_frigates.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_frigates.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_healthcheckpolicies.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_healthcheckpolicies.yaml index 1be37bd5985..61381b747c5 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_healthcheckpolicies.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_healthcheckpolicies.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_krakens.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_krakens.yaml index 17c9dee34b3..620a12faaee 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_krakens.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_krakens.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_lakers.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_lakers.yaml index bb71ce27b27..58df2264dde 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_lakers.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_lakers.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_leviathans.yaml b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_leviathans.yaml index 7076f04bd80..5cb95bc7b38 100644 --- a/testdata/project-v3-multigroup/config/crd/patches/webhook_in_leviathans.yaml +++ b/testdata/project-v3-multigroup/config/crd/patches/webhook_in_leviathans.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3/config/crd/patches/webhook_in_admirales.yaml b/testdata/project-v3/config/crd/patches/webhook_in_admirales.yaml index 2bde272e76a..cf986a6a411 100644 --- a/testdata/project-v3/config/crd/patches/webhook_in_admirales.yaml +++ b/testdata/project-v3/config/crd/patches/webhook_in_admirales.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3/config/crd/patches/webhook_in_captains.yaml b/testdata/project-v3/config/crd/patches/webhook_in_captains.yaml index 39ef2528c5a..f73ae2e8abc 100644 --- a/testdata/project-v3/config/crd/patches/webhook_in_captains.yaml +++ b/testdata/project-v3/config/crd/patches/webhook_in_captains.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1 diff --git a/testdata/project-v3/config/crd/patches/webhook_in_firstmates.yaml b/testdata/project-v3/config/crd/patches/webhook_in_firstmates.yaml index a644d053242..76ee5acedbd 100644 --- a/testdata/project-v3/config/crd/patches/webhook_in_firstmates.yaml +++ b/testdata/project-v3/config/crd/patches/webhook_in_firstmates.yaml @@ -12,3 +12,5 @@ spec: namespace: system name: webhook-service path: /convert + conversionReviewVersions: + - v1