Skip to content

Commit

Permalink
Duplicate CRDs into crds directory to be used in kustomizations (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashofmann authored Nov 26, 2024
1 parent 616d0bd commit b238f18
Show file tree
Hide file tree
Showing 6 changed files with 3,235 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GCI ?= $(LOCALBIN)/gci
CONTROLLER_TOOLS_VERSION ?= v0.16.1
CRD_REF_DOCS_VERSION ?= v0.0.12
CHART_DIR ?= charts/qdrant-kubernetes-api
CRDS_DIR ?= crds

lint:
bash -c 'files=$$(gofmt -l .) && echo $$files && [ -z "$$files" ]'
Expand All @@ -23,9 +24,9 @@ gen: manifests generate format vet ## Generate code containing DeepCopy, DeepCop
manifests: controller-gen ## Generate CustomResourceDefinition objects.
rm $(CHART_DIR)/templates/management-crds/*.yaml
rm $(CHART_DIR)/templates/region-crds/*.yaml
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=$(CHART_DIR)/templates
mv $(CHART_DIR)/templates/qdrant.io_qdrantreleases.yaml $(CHART_DIR)/templates/management-crds/
mv $(CHART_DIR)/templates/qdrant*.yaml $(CHART_DIR)/templates/region-crds/
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=$(CRDS_DIR)
mv $(CRDS_DIR)/qdrant.io_qdrantreleases.yaml $(CHART_DIR)/templates/management-crds/
cp $(CRDS_DIR)/qdrant*.yaml $(CHART_DIR)/templates/region-crds/
for file in $(CHART_DIR)/templates/management-crds/*.yaml; do \
echo "{{ if .Values.includeManagementCRDs }}" | cat - $$file > temp && mv temp $$file; \
echo "{{ end }}" >> $$file; \
Expand Down
Loading

0 comments on commit b238f18

Please sign in to comment.