Skip to content
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

Add option to toggle CRD installation #4913

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matusf
Copy link
Contributor

@matusf matusf commented Dec 2, 2024

Description
Add helm value to helm chart to enable or disable CRD installation.

This would allow and simplify installing multiple instances of external-dns to one cluster. Also in multi-tenant clusters, where CRD installation is not allowed, this would be an great enabler. Default value is enabled, to not introduce any breaking changes, while allowing an override to disable the installation.

Fixes #4850

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 2, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign stevehipwell for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 2, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @matusf. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 2, 2024
@matusf
Copy link
Contributor Author

matusf commented Dec 2, 2024

/assign @stevehipwell

@stevehipwell
Copy link
Contributor

Thanks for the PR @matusf but that's not how CRDs work; you can't template a CRD in the crds folder, they're either in the chart or not. Please check out #4322 for the context around the decision to include the CRD in the Helm chart and I've added a comment to the original issue.

@matusf
Copy link
Contributor Author

matusf commented Dec 2, 2024

Hi, thanks, I know that crds ideally should be in the crds folder, but to template it I needed to put them inside the templates folder. It is done in this way in a bitnami chart of external-dns.

Regarding the --skip-crds flag. That does not really work for me because I have a helm chart that has multiple dependencies (external-dns being one of them) and I want to install crds from the other dependency. As far as I know, there is no way to set the --skip-crds to only one of my dependency. Only to whole chart.

I also read through the discussion in the #4322 PR, but I have not found any argument why it the crds should not be in the templates folder. As far as I understand, the discussion was about whether to include the crd in the chart or not.

@stevehipwell
Copy link
Contributor

CRDs should be in the crds folder, that's the Helm idiom; putting them in templates isn't an option here. I also wouldn't take Bitnami charts as a source for patterns, this chart exists because I didn't want to use the Bitnami chart.

@matusf
Copy link
Contributor Author

matusf commented Dec 9, 2024

You are right, it is an idiom and should be followed if possible. However, I do not see other solution to this issue. There are many reputable charts that opted for this solution to solve the issue (because they have not found other solution). They are mentioned, in the issue you linked.

It seems like we are deciding between having a non idiomatic solution to an existing problem or not having a solution at all.

@stevehipwell
Copy link
Contributor

@matusf I didn't want the CRD in the chart for this very reason, but given that you shouldn't use Helm for installing CRDs having the CRDs in the chart and expecting the use of --skip-crds is the compromise that was decided on. I'm not willing to move the CRDs out of their idiomatic location and into the templates dir just because others have done this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

helm chart - add value to enable or disable CRD installation
3 participants