Skip to content

Commit d753668

Browse files
committed
Refactor Helm chart to manage CRDs in a dedicated directory, removing crd.yaml template. Update Makefile to sync CRDs and update operator.yaml with new CRD definitions. Adjust values.yaml to reflect CRD management changes and enhance dashboard configuration options.
1 parent 0571457 commit d753668

File tree

6 files changed

+2636
-199
lines changed

6 files changed

+2636
-199
lines changed

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ help: ## Display this help.
4747
.PHONY: manifests
4848
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
4949
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
50+
@echo "Syncing CRDs to Helm chart..."
51+
@mkdir -p charts/homer-operator/crds
52+
@cp config/crd/bases/homer.rajsingh.info_dashboards.yaml charts/homer-operator/crds/
53+
@if [ -f charts/homer-operator/templates/crd.yaml ]; then \
54+
echo "Removing old CRD template from charts/homer-operator/templates/crd.yaml"; \
55+
rm charts/homer-operator/templates/crd.yaml; \
56+
fi
5057

5158
.PHONY: generate
5259
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -124,6 +131,8 @@ build-installer: manifests generate kustomize ## Generate a consolidated YAML wi
124131
echo "---" >> dist/install.yaml # Add a document separator before appending
125132
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
126133
$(KUSTOMIZE) build config/default >> dist/install.yaml
134+
@echo "Updating deploy/operator.yaml..."
135+
@cp dist/install.yaml deploy/operator.yaml
127136

128137
##@ Deployment
129138

0 commit comments

Comments
 (0)