helmfile: helmfile apply does not install crds folder
When using apply to install a helm 3 style chart with crds folder we get an error that the kind does not yet exist. Directly installing with sync does work however.
Shouldn’t helmfile get a list of installed releases so it knows to use sync upon first install?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 19 (4 by maintainers)
Commits related to this issue
- Improve handling of releases being newly installed by helmfile-apply Adds two flags to `helmfile apply`. `--skip-diff-on-install` is for entirely skipping helm-diff on newly installed release. `--dis... — committed to roboll/helmfile by mumoshu 4 years ago
- Improve handling of releases being newly installed by helmfile-apply Adds two flags to `helmfile apply`. `--skip-diff-on-install` is for entirely skipping helm-diff on newly installed release. `--dis... — committed to roboll/helmfile by mumoshu 4 years ago
- Improve handling of releases being newly installed by helmfile-apply This improves helmfile-apply on two things: - Some users had timing-out issues or annoyed by huge output from helm-diff run as pa... — committed to roboll/helmfile by mumoshu 4 years ago
- Improve handling of releases being newly installed by helmfile-apply This improves helmfile-apply on two things: - Some users had timing-out issues or annoyed by huge output from helm-diff run as pa... — committed to roboll/helmfile by mumoshu 4 years ago
- Improve handling of releases being newly installed by helmfile-apply (#1618) This improves helmfile-apply with two things: - Some users had timing-out issues or annoyed by huge output from helm-di... — committed to roboll/helmfile by mumoshu 4 years ago
@Morriz This comes from the fundamental issue on how K8s validates resources. As a workaround, I’ve added
disableValidation: truewhich should be set for charts likeprometheus-operatorthat tries to install CRDs and CRs on first install. See #1373Re: idempotency, Helm 3 does support idempotency. You can verify that by e.g. seeing
helmfile syncandhelm upgrade --installjust work against a chart like promethues-operator. It’s Helmfile + helm-diff’s problem.disableValidation: trueis one of the solutions to it.Another, potential solution would be to enable Helmfile to prevent showing diff on first install as you’ve suggested. But it shall be a breaking change. I think this specific issue can be addressed by
disableValidationso shall we defer the first-install handling to another issue?@Morriz Perhaps we can just enhance Helmfile to automatically set
--disable-openapi-validationto helm-diff only when the target release is not yet installed? So that helm-diff called by helmfile would never fail due to missing CRD on first install.Related https://github.com/databus23/helm-diff/pull/228
Basically, it’s a bit more elegant version of
if helm list | grep your-crds-release; then helmfile apply; else helmfile sync.@reixd I hear you. Do you think https://github.com/roboll/helmfile/issues/1353#issuecomment-726533131 would resolve your issue?
I am re-reading this again, and am concerned this will happen again soon: CRDs don’t get deployed, even though helm 3 supports deploying both CRDs and CRs at the same time.
we would like to be able to add repeatable, indempotent instructions to apply a chart to a cluster, so I would like to ask if helmfile might have solved this problem already in the mean time?
@mumoshu thanks again for your help!
Also, only the output would be different, but the resulting state is the same, so no breaking change imo. Who would use the text output of apply as input for anything? It’s just feedback for humans