community icon indicating copy to clipboard operation
community copied to clipboard

H4HIP: CRD updating

Open gjenkins8 opened this issue 1 year ago • 6 comments

gjenkins8 avatar Dec 21 '24 04:12 gjenkins8

Its pretty common these days for crds to be in templates so they can be upgraded too. We should probably keep this behavior and align it with the /crds directory too.

Maybe:

  • Render templates part 1. Render out any crds found, ignoring other templates. Treat the rendered crds as if in /crds, apply those. Render templates part 2. Render everything but the crds as normal

kfox1111 avatar Dec 21 '24 13:12 kfox1111

Its pretty common these days for crds to be in templates so they can be upgraded too. We should probably keep this behavior and align it with the /crds directory too.

Maybe:

  • Render templates part 1. Render out any crds found, ignoring other templates. Treat the rendered crds as if in /crds, apply those. Render templates part 2. Render everything but the crds as normal

In what circumstances do people actually need CRDs to be dynamic (with templating)? To my knowledge, CRDs tend to end up in the templates/ dir, solely so Helm will update them. Not because the the CRD structure needs to be adjusted. Examples/rationale for otherwise appreciated!

(Generally, the goal here is to improve Helm's CRDs handling. Which doesn't mean all improvements need to be done at once. templating CRDs might be done as a future improvement)

gjenkins8 avatar Feb 01 '25 23:02 gjenkins8

In what circumstances do people actually need CRDs to be dynamic (with templating)? To my knowledge, CRDs tend to end up in the templates/ dir, solely so Helm will update them. Not because the the CRD structure needs to be adjusted. Examples/rationale for otherwise appreciated!

I dont think its common for crds in templates to actually be templates. but, right now there are two choices. as a packager.

You put your crds in crds dir, and they never upgrade making things more complicated for end users. You put them in templates, and upgrades work.

If 4 will maintain backwards compat with 3, then it will need to support crds in templates/ still.

kfox1111 avatar Feb 10 '25 16:02 kfox1111

If 4 will maintain backwards compat with 3, then it will need to support crds in templates/ still.

Certainly, this HIP only pertains to CRDs in the crds/ directory:

https://github.com/helm/community/pull/379/files#diff-e94b50b2c7a2d45c81db342448ae78950464d77488a62b315a2b715549fe1a95R79

gjenkins8 avatar Feb 22 '25 04:02 gjenkins8

We've seen a lot of issues like this trying to find workarounds to Helm's current CRD update limitations. Linking this example here because this HIP is now on my radar. Will also try to link future issues here when I run into them naturally. https://github.com/actions/actions-runner-controller/pull/2295

scottrigby avatar Apr 27 '25 19:04 scottrigby

I really like the intent to solve this problem which is out there for so long.

farazkhawaja avatar Jul 26 '25 20:07 farazkhawaja