Skip to content

Commit

Permalink
Merge pull request #783 from Nordix/add-skip-crd-name-check-annotatio…
Browse files Browse the repository at this point in the history
…n-to-m3datas/furkat

🌱 Add SkipCRDNamePreflightCheckAnnotation to Metal3Data CRD
  • Loading branch information
metal3-io-bot authored Nov 22, 2022
2 parents da82c88 + 5465d45 commit 496bfb4
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 496bfb4

Please sign in to comment.