File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {{- if .Values.crds.enabled }}
1+ {{- if REPLACE_CRD_EXPRESSION }}
22apiVersion : apiextensions.k8s.io/v1
33kind : CustomResourceDefinition
44metadata :
Original file line number Diff line number Diff line change 3939
4040crds_dir ?= deploy/crds
4141crds_dir_readme := $(dir $(lastword $(MAKEFILE_LIST ) ) ) /crds_dir.README.md
42+ crds_expression ?= .Values.crds.enabled
4243
4344.PHONY : generate-crds
4445# # Generate CRD manifests.
@@ -60,6 +61,7 @@ generate-crds: | $(NEEDS_CONTROLLER-GEN) $(NEEDS_YQ)
6061 crd_name=$$($(YQ) eval '.metadata.name' $(crds_gen_temp)/$$i); \
6162 cat $(crd_template_header) > $(helm_chart_source_dir)/templates/crd-$$i; \
6263 echo "" >> $(helm_chart_source_dir)/templates/crd-$$i; \
64+ $(sed_inplace) "s/REPLACE_CRD_EXPRESSION/$(crds_expression)/g" $(helm_chart_source_dir)/templates/crd-$$i; \
6365 $(sed_inplace) "s/REPLACE_CRD_NAME/$$crd_name/g" $(helm_chart_source_dir)/templates/crd-$$i; \
6466 $(sed_inplace) "s/REPLACE_LABELS_TEMPLATE/$(helm_labels_template_name)/g" $(helm_chart_source_dir)/templates/crd-$$i; \
6567 $(YQ) -I2 '{"spec": .spec}' $(crds_gen_temp)/$$i >> $(helm_chart_source_dir)/templates/crd-$$i; \
You can’t perform that action at this time.
0 commit comments