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

[kube-prometheus-stack] manual steps to update CRD's using kubectl apply #4507

Open
kunalmehta-eve opened this issue May 2, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kunalmehta-eve
Copy link

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

@kunalmehta-eve kunalmehta-eve added the bug Something isn't working label May 2, 2024
@zeritti zeritti changed the title [prometheus-kube-stack] 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 [kube-prometheus-stack] manual steps to update CRD's using kubectl apply May 5, 2024
@GMartinez-Sisti
Copy link
Member

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.

@jkroepke
Copy link
Member

jkroepke commented May 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants