From 38cdd2f7d69ef0dcf0da521b076539d80af99034 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 22:12:28 +0000 Subject: [PATCH 1/2] crds: add `kustomization.yaml` This `kustomization` simply lists all CRD manifests. As such it can be referred to from other layers to import/include all CRDs in another rendering. --- crds/kustomization.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 crds/kustomization.yaml diff --git a/crds/kustomization.yaml b/crds/kustomization.yaml new file mode 100644 index 00000000..f8e54dcc --- /dev/null +++ b/crds/kustomization.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - objectstorage.k8s.io_bucketaccesses.yaml + - objectstorage.k8s.io_bucketaccessclasses.yaml + - objectstorage.k8s.io_bucketaccessrequests.yaml + - objectstorage.k8s.io_bucketclasses.yaml + - objectstorage.k8s.io_bucketrequests.yaml + - objectstorage.k8s.io_buckets.yaml From 584f54ac314739463690ff3627cad5e5702cdc34 Mon Sep 17 00:00:00 2001 From: Nicolas Trangez Date: Thu, 17 Dec 2020 22:48:22 +0000 Subject: [PATCH 2/2] crds: patch in `api-approved` label through Kustomization This was taken from the `kustomization.yaml` found in the `container-object-storage-interface-controller` repository which in turn deploys these CRDs. See: https://github.com/kubernetes-sigs/container-object-storage-interface-controller/blob/f6867a078f0b6254aadd61987e103174bfa6b870/deploy/base/kustomization.yaml#L18 --- crds/kustomization.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crds/kustomization.yaml b/crds/kustomization.yaml index f8e54dcc..5737d20b 100644 --- a/crds/kustomization.yaml +++ b/crds/kustomization.yaml @@ -9,3 +9,13 @@ resources: - objectstorage.k8s.io_bucketclasses.yaml - objectstorage.k8s.io_bucketrequests.yaml - objectstorage.k8s.io_buckets.yaml + +patches: +- target: + kind: CustomResourceDefinition + patch: |- + - op: add + path: /metadata/annotations + value: + controller-gen.kubebuilder.io/version: (devel) + api-approved.kubernetes.io: https://github.com/kubernetes-sigs/container-object-storage-interface-api/pull/2