diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 931ed265da..2b6a4d1dcd 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -44,6 +44,10 @@ patchesStrategicMerge: - patches/cainjection_in_metal3remediationtemplates.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch +# [ANNOTATION] To add CRD name check skip, uncomment the section with [ANNOTATION] prefix. +# patch here is for adding an annotation for specific CRD (Metal3Data) +- patches/skipcrdnamecheck_in_metal3datas.yaml + # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: - kustomizeconfig.yaml diff --git a/config/crd/patches/skipcrdnamecheck_in_metal3datas.yaml b/config/crd/patches/skipcrdnamecheck_in_metal3datas.yaml new file mode 100644 index 0000000000..a8cdd9820a --- /dev/null +++ b/config/crd/patches/skipcrdnamecheck_in_metal3datas.yaml @@ -0,0 +1,10 @@ +# The following patch adds "clusterctl.cluster.x-k8s.io/skip-crd-name-preflight-check" +# CAPI annotation for clusterctl to inject annotation into the CRD. See more why this is needed +# here: https://github.com/kubernetes-sigs/cluster-api/issues/5686#issuecomment-1238255937 +# CRD conversion requires k8s 1.13 or later. +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + clusterctl.cluster.x-k8s.io/skip-crd-name-preflight-check: "" + name: metal3datas.infrastructure.cluster.x-k8s.io \ No newline at end of file