[kube-prometheus-stack] manual steps to update CRD's using kubectl apply
kunalmehta-eve opened this issue · 2 comments
Describe the bug a clear and concise description of what the bug is.
As per chart version 48.0.0 release notes we are no more required to upgrade CRD'S maually before upgrading stack to newer major version but in release notes of 49.0.0 again it is mentioned to do those manul steps to update CRD's using kubectl apply
What's your helm version?
3.14.4
What's your kubectl version?
1.28.5
Which chart?
prometheus-kube-stack
What's the chart version?
49.0.0
What happened?
No response
What you expected to happen?
No response
How to reproduce it?
No response
Enter the changed values of values.yaml?
No response
Enter the command that you execute and failing/misfunctioning.
xx
Anything else we need to know?
No response
This is not required if the CRDs are being managed by the helm chart, but since we don't know what users are doing they need to be included.
I would like to take this a step further and create a pre-install
job hook that will install the CRDs for the correct version:
- this is now becoming a common pattern since the application and CRDs should match, so the application installs the correct CRDs on start, or in case of helm on deploy
- CRDs are better not being managed by GitOps tools to ensure they are not removed by mistake, we usually never want to remove CRDs, and if so should be a manual operation since it's dangerous
- scales with environments and GitOps practices by preventing manual steps on updates
This would be of course an optional configuration, disabled by default but I think it would benefit most users. I'm actually doing this right now on my job, so the overall work is already done.
@jkroepke since you were involved with the latest CRD changes I'd like to hear your input.
As per chart version 48.0.0 release notes we are no more required to upgrade CRD'S maually before upgrading stack to newer major
Could you please explain, where you got the information?
This is not required if the CRDs are being managed by the helm chart
By design, Helm will not managed CRDs, because the helm maintainers has the opinion that it isn't possible to just run kubectl apply to managed them. Long story here: https://github.com/helm/community/blob/main/hips/hip-0011.md
since you were involved with the latest CRD changes I'd like to hear your input.
I know that pattern from velero. Personally, I'm would never use such functionality, but a lot of users can benefit from it. Go for it. Luckly, hooks are not part of release, I did not except release size issues here.