Skip to content

Commit 0d588d7

Browse files
committed
infra/feast-operator: add CRD sync/verify targets and integrate into manifests; gate by Values.crds.install; fix verify diff and BSD sed; remove circular dep
Signed-off-by: matt <[email protected]>
1 parent f1952a2 commit 0d588d7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

infra/feast-operator/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ help: ## Display this help.
9999
.PHONY: manifests
100100
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
101101
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:maxDescLen=120 webhook paths="./..." output:crd:artifacts:config=config/crd/bases
102+
# Keep Helm chart CRD in sync (wrapped behind Values.crds.install)
103+
$(MAKE) chart-sync-crd
102104

103105
.PHONY: generate
104106
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -367,3 +369,24 @@ catalog-push: ## Push a catalog image.
367369
.PHONY: related-image-fs
368370
related-image-fs: envsubst
369371
FS_IMG=$(FS_IMG) CJ_IMG=$(CJ_IMG) $(ENVSUBST) < config/default/related_image_fs_patch.tmpl > config/default/related_image_fs_patch.yaml
372+
373+
##@ Helm chart (operator)
374+
375+
.PHONY: chart-verify-crd
376+
chart-verify-crd: ## Verify Helm chart CRD matches generated CRD (ignoring Helm gate)
377+
@diff -u \
378+
<(grep -v '^{{-' ../charts/feast-operator/templates/crd.yaml | sed '/^---$$/d;/^[[:space:]]*$$/d') \
379+
<(sed '/^---$$/d;/^[[:space:]]*$$/d' config/crd/bases/feast.dev_featurestores.yaml)
380+
381+
.PHONY: chart-sync-crd
382+
chart-sync-crd: ## Sync generated CRD into Helm chart (wrapped in Values.crds.install)
383+
@{ \
384+
echo "{{- if .Values.crds.install }}"; \
385+
echo; \
386+
cat config/crd/bases/feast.dev_featurestores.yaml; \
387+
echo; \
388+
echo "{{- end }}"; \
389+
} > ../charts/feast-operator/templates/crd.yaml
390+
391+
.PHONY: chart-verify
392+
chart-verify: chart-verify-crd ## Aggregate chart checks (extend as needed)

0 commit comments

Comments
 (0)