traefik-helm-chart icon indicating copy to clipboard operation
traefik-helm-chart copied to clipboard

Establish CRD update process

Open z0rc opened this issue 3 years ago • 2 comments
trafficstars

Welcome!

  • [X] Yes, I've searched similar issues on GitHub and didn't find any.
  • [X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?

Followup to https://github.com/traefik/traefik-helm-chart/issues/577 and https://github.com/traefik/traefik-helm-chart/pull/558. Any update to CRD should be visible and properly announced. This is due to how helm handles CRD lifecycle:

  • Helm installs CRDs, if they are missing on chart install or upgrade
  • Helm doesn't upgrade CRDs, if they are already present on chart install or upgrade
  • Helm doesn't uninstall CRDs on chart uninstall

See https://github.com/helm/community/blob/main/hips/hip-0011.md for rationale.

Given all this, any changes to CRDs should be a major version bump, and there should be instructions how end user can update CRDs on existing installations, usually using kubectl. See how kube-prometheus-stack chart handles this. https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack#upgrading-an-existing-release-to-a-new-major-version

z0rc avatar Mar 30 '22 10:03 z0rc

https://github.com/traefik/traefik-helm-chart/pull/582 continues problematic trend.

z0rc avatar Mar 30 '22 14:03 z0rc

Adding https://github.com/traefik/traefik-helm-chart/issues/611 to collection.

z0rc avatar Aug 10 '22 10:08 z0rc

Adding https://github.com/traefik/traefik-helm-chart/pull/644 to collection.

z0rc avatar Oct 04 '22 10:10 z0rc

Hello @z0rc,

Thanks for your interests in Traefik Documentation quality. Wdyt about PR #649 ?

mloiseleur avatar Oct 07 '22 11:10 mloiseleur

Hello @z0rc,

Thanks for your interests in Traefik Documentation quality. Wdyt about PR #649 ?

Documentation is great and process is solid.

However, the complaint by @z0rc was not the documentation itself. @z0rc complains that you should never do changes to CRDs without major version changes or, at least, sending out a clear warning to users. Because helm doesn't keep track of it.

Documenting how to do it, solves half of the problem. You should also clearly instruct your developers to stop pushing CRD changes outside of major version increases (a bit like prometheus handles this).

To be frank: things like "keeping version numbers in a CRD" are a super bad practice, as they should never change outside of major version increases.

TLDR: You also need to stop your developers from changing CRDs this easily.

PrivatePuffin avatar Nov 07 '22 18:11 PrivatePuffin