Skip to content

Commit

Permalink
Add "clusterctl.cluster.x-k8s.io/skip-crd-name-preflight-check" annot…
Browse files Browse the repository at this point in the history
…ation

to Metal3Data CRD through the kustomize patches
  • Loading branch information
furkatgofurov7 committed Nov 22, 2022
1 parent da82c88 commit 5465d45
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions config/crd/patches/skipcrdnamecheck_in_metal3datas.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5465d45

Please sign in to comment.