-
Notifications
You must be signed in to change notification settings - Fork 1
Move crds to templates folder #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,20 @@ gen: manifests generate format vet ## Generate code containing DeepCopy, DeepCop | |
|
|
||
| .PHONY: manifests | ||
| manifests: controller-gen ## Generate CustomResourceDefinition objects. | ||
| $(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=charts/qdrant-operator-crds/crds | ||
| cp charts/qdrant-operator-crds/crds/qdrant.io_qdrantversions.yaml charts/qdrant-operator-crds/crds-for-cluster-api/qdrant.io_qdrantversions.yaml | ||
| rm charts/qdrant-operator-crds/templates/management-crds/*.yaml | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to keep them in git repo at all, if everybody just consumes the published chart? |
||
| rm charts/qdrant-operator-crds/templates/region-crds/*.yaml | ||
| $(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=charts/qdrant-operator-crds/templates | ||
| mv charts/qdrant-operator-crds/templates/qdrant.io_qdrantversions.yaml charts/qdrant-operator-crds/templates/management-crds/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe not for this PR, but we want to rename QdrantVersion to QdrantRelease
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yup, there is ticket for that. |
||
| mv charts/qdrant-operator-crds/templates/qdrant*.yaml charts/qdrant-operator-crds/templates/region-crds/ | ||
| for file in charts/qdrant-operator-crds/templates/management-crds/*.yaml; do \ | ||
| echo "{{ if .Values.includeManagementCRDs }}" | cat - $$file > temp && mv temp $$file; \ | ||
| echo "{{ end }}" >> $$file; \ | ||
| done | ||
| for file in charts/qdrant-operator-crds/templates/region-crds/*.yaml; do \ | ||
| echo "{{ if .Values.includeRegionCRDs }}" | cat - $$file > temp && mv temp $$file; \ | ||
| echo "{{ end }}" >> $$file; \ | ||
| done | ||
| helm lint charts/qdrant-operator-crds | ||
|
|
||
| .PHONY: generate | ||
| generate: controller-gen crd-ref-docs ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Include management-crds in the deployment | ||
| includeManagementCRDs: false | ||
| # Include region-crds in the deployment | ||
| includeRegionCRDs: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines got expanded into 13 lines. I would suggest to move this logic into a script under
hackdirectory, keeping the makefile easier to read and making the script testable.