diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 813540a4d..37668c6fb 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,15 +2,16 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/nnf.cray.hpe.com_nnfnodes.yaml -- bases/nnf.cray.hpe.com_nnfnodestorages.yaml -- bases/nnf.cray.hpe.com_nnfstorages.yaml -- bases/nnf.cray.hpe.com_nnfdatamovements.yaml -- bases/nnf.cray.hpe.com_nnfaccesses.yaml -- bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml -- bases/nnf.cray.hpe.com_nnfnodeecdata.yaml -- bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml -- bases/nnf.cray.hpe.com_nnfportmanagers.yaml + - bases/nnf.cray.hpe.com_nnfnodes.yaml + - bases/nnf.cray.hpe.com_nnfnodestorages.yaml + - bases/nnf.cray.hpe.com_nnfstorages.yaml + - bases/nnf.cray.hpe.com_nnfdatamovements.yaml + - bases/nnf.cray.hpe.com_datamovementmanagers.yaml + - bases/nnf.cray.hpe.com_nnfaccesses.yaml + - bases/nnf.cray.hpe.com_nnfstorageprofiles.yaml + - bases/nnf.cray.hpe.com_nnfnodeecdata.yaml + - bases/nnf.cray.hpe.com_nnfcontainerprofiles.yaml + - bases/nnf.cray.hpe.com_nnfportmanagers.yaml #+kubebuilder:scaffold:crdkustomizeresource patchesStrategicMerge: @@ -42,4 +43,4 @@ patchesStrategicMerge: # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: -- kustomizeconfig.yaml + - kustomizeconfig.yaml diff --git a/config/crd/patches/cainjection_in_datamovementmanagers.yaml b/config/crd/patches/cainjection_in_datamovementmanagers.yaml new file mode 100644 index 000000000..e82498122 --- /dev/null +++ b/config/crd/patches/cainjection_in_datamovementmanagers.yaml @@ -0,0 +1,7 @@ +# The following patch adds a directive for certmanager to inject CA into the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + name: datamovementmanagers.nnf.cray.hpe.com diff --git a/config/crd/patches/webhook_in_datamovementmanagers.yaml b/config/crd/patches/webhook_in_datamovementmanagers.yaml new file mode 100644 index 000000000..348423e67 --- /dev/null +++ b/config/crd/patches/webhook_in_datamovementmanagers.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: datamovementmanagers.nnf.cray.hpe.com +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1