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

Helm release stuck when release name is invalid #555

Closed
stgrace opened this issue Nov 7, 2022 · 1 comment · Fixed by #738
Closed

Helm release stuck when release name is invalid #555

stgrace opened this issue Nov 7, 2022 · 1 comment · Fixed by #738

Comments

@stgrace
Copy link

stgrace commented Nov 7, 2022

When creating a HelmRelease with an invalid name, for example one that is too long, it can not be deleted anymore without editing the finalizer.

I think if a release can not be created, be it due to an invalid name, the controller should be able to delete the helmrelease without errors or without changing the finalizer of the helmrelease

{"level":"error","ts":"2022-11-07T15:52:05.522Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"web-miles-web-sofico-customer-support-design-200-design-221","namespace":"dev-mri"},"namespace":"dev-mri","name":"web-miles-web-sofico-customer-support-design-200-design-221","reconcileID":"50e573ac-4eb7-4996-9046-22deb834e22f","error":"uninstall: Release name is invalid: web-miles-web-sofico-customer-support-design-200-design-221"}
{"level":"error","ts":"2022-11-07T15:52:05.527Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"web-miles-web-sofico-fleet-manager-design-200-design-221","namespace":"dev-mri"},"namespace":"dev-mri","name":"web-miles-web-sofico-fleet-manager-design-200-design-221","reconcileID":"769314e2-b798-4af3-bdf6-6ba6f9f19020","error":"uninstall: Release name is invalid: web-miles-web-sofico-fleet-manager-design-200-design-221"}
{"level":"error","ts":"2022-11-07T15:52:05.527Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"web-miles-web-sofico-maintenance-design-200-design-221","namespace":"dev-mri"},"namespace":"dev-mri","name":"web-miles-web-sofico-maintenance-design-200-design-221","reconcileID":"c4de392a-cfae-43bc-b467-e7cbc835d6d6","error":"uninstall: Release name is invalid: web-miles-web-sofico-maintenance-design-200-design-221"}
kingdonb pushed a commit to kingdonb/bootstrap-repo that referenced this issue Nov 10, 2022
fluxcd/helm-controller#555

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
kingdonb pushed a commit to kingdonb/bootstrap-repo that referenced this issue Nov 10, 2022
fluxcd/helm-controller#555

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
@kingdonb
Copy link
Member

This should be caught by the admission controller and prevented when you create your HelmRelease object.

flux-system   flux-system   5m20s   False   HelmRelease/default/bad-podinfo dry-run failed, reason: Invalid, error: HelmRelease.helm.toolkit.fluxcd.io "bad-podinfo" is invalid: spec.releaseName: Invalid value: "web-miles-web-sofico-customer-support-design-200-design-221": spec.releaseName in body should be at most 53 chars long...

Here's the error I get from Kustomize controller when I try to create a HelmRelease as you've described. How did you get it to create that HelmRelease? It should not have got that far.

Could you let us know what version of K8s and Flux you are using? I have attached some commits that tested various permutations of HelmReleases with releaseName around 53 characters, and I have not been able to reproduce this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants