Skip to content

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

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Conversation

areina
Copy link
Contributor

@areina areina commented Sep 19, 2024

Currently, the CRDs are created during helm install but they aren't updated.

This PR moves them from crds to templates to solve that.
It also introduces a new parameter to control if the qdrantversions CRD has to be installed.

@areina areina self-assigned this Sep 19, 2024
@areina areina requested a review from a team as a code owner September 19, 2024 11:12
@github-actions github-actions bot added the chore label Sep 19, 2024
areina and others added 3 commits September 26, 2024 12:42
- Update makefile to add a conditional block to the qdrantversions template
- Add parameter to the chart values
- Remove duplicated qdrantversions.yaml file
@bashofmann bashofmann force-pushed the chore/toni/move-crds-to-templates branch from 737bdad to 00e4bd6 Compare September 26, 2024 10:43
rm charts/qdrant-operator-crds/templates/management-crds/*.yaml
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/
Copy link
Contributor

Choose a reason for hiding this comment

The 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, there is ticket for that.

Copy link
Contributor

@Robert-Stam Robert-Stam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bashofmann bashofmann merged commit 62c73e0 into main Sep 26, 2024
2 checks passed
@bashofmann bashofmann deleted the chore/toni/move-crds-to-templates branch September 26, 2024 11:43
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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?

@@ -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
Copy link
Contributor

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 hack directory, keeping the makefile easier to read and making the script testable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants