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

How to handle upgrade of CRDs with Helm #1325

Open
alternaivan opened this issue Nov 29, 2023 · 3 comments
Open

How to handle upgrade of CRDs with Helm #1325

alternaivan opened this issue Nov 29, 2023 · 3 comments
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@alternaivan
Copy link

Hi there!

In Helm documentation for CRDs, the upgrade of them is currently not supported. See this link.

In your CONTRIBUTING.md it's stated that with the CRD upgrade the helm chart will also get an upgrade.

Initial installation of the grafana-operator helm chart will install the CRDs as well. My question is - when CRDs get an update, how will the helm upgrade of the chart be handled?

One possible solution would be to add parameter to values.yaml that will enable or disable installation of CRDs, so that they can be manually upgraded.

crds:
  enable: false

What do you think?

Thanks,
Marjan

@alternaivan alternaivan added enhancement New feature or request needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 29, 2023
@NissesSenap
Copy link
Collaborator

Hi @alternaivan
So the contributing guide isn't mean, as it will update the CRD automatically on your cluster. It is, if you update the CRD in the code and you then run make manifests, it will update the helm chart CRDs automatically.

Just as you say the CRDs won't get updated using helm, and we have pointed that out here https://grafana-operator.github.io/grafana-operator/blog/2023/03/14/version-5-getting-started/#helm-crd-caveats, but we should probably point it out in the docs as well.

I think your idea about adding a new flag that is, sounds good.
We only have to take the manifests generation in to account, when running make manifests
.

So other than updating the values file, you also need to inject some kind of helm template value on top of the CRD files so you can remove the creation of it.

We would love a PR for the helm chart and get documentation on how you could update the CRDs manually using kustomize or something similar.

@NissesSenap NissesSenap added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 5, 2023
@NissesSenap NissesSenap changed the title How to handle upgrade of CRDs with Helm? How to handle upgrade of CRDs with Helm Dec 5, 2023
@NissesSenap
Copy link
Collaborator

A potential solution is to release the CRDs as a separate artifact as part of our release. See comments in #1373

@NissesSenap
Copy link
Collaborator

In our next release, we will start to publish the CRDs separately. We should be able to use a simple kubectl apply to fix it.
We just need to document it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

2 participants