-
Notifications
You must be signed in to change notification settings - Fork 566
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 upgrade failed for release, <HELM CHART> has no deployed releases #4614
Comments
The only thing I found was I was having similar issues with another helm repo, and the only way I could fix it was to nuke the entire flux bootstrap and restart. Saying that, that's not really practical for anything beyond setup... is there some other way to force reset helm (if that is actually the issue?) This hasn't worked for this chart, it has been stuck like this for a while now. |
Hi, what I can see is that the HelmRepository manifest is named "rook-ceph", but in the HelmRelease the referenced HelmRepository name ist "rook". What helps me often is to run following command: |
@98jan thanks for the reply, I must have changed that last night while playing around, unfortunately it's still stuck with the error. |
The interesting part to me is that, the error has to do with releases not the chart itself, which to me looks like the release is the issue as it finds To me this looks like the release name is somehow wrong/non-existent? Even tho it is specified and should be the same as the name of the HelmRelease from above? I think this has to do with the application of the What is also interesting is any time I try to force a reconcile it results in the following: ► annotating HelmRelease rook-ceph-cluster in rook-ceph namespace |
Yeah there's something very unusual going on, nuked the node and recreated everything and it's now working:
No change to the charts or anything, just started working after I deleted everything... Is there any general advice on how to debug issues like this? Seems like general flakeyness but it's not clear why this worked or even what the actual original issue was. |
Not exactly the same situation. I had the same error while porting release that was installed by The fix was to delete helm release secret I tried to look into helm-controller code base, the path I found that could lead to this error is when
case ReleaseStatusUnmanaged:
log.Info(msgWithReason("release not managed by controller", state.Reason))
// Clear the history as we can no longer rely on it.
req.Object.Status.ClearHistory()
return NewUpgrade(r.configFactory, r.eventRecorder), nil
func Upgrade(ctx context.Context, config *helmaction.Configuration, obj *v2.HelmRelease, chrt *helmchart.Chart,
vals helmchartutil.Values, opts ...UpgradeOption) (*helmrelease.Release, error) {
upgrade := newUpgrade(config, obj, opts)
policy, err := crdPolicyOrDefault(obj.GetUpgrade().CRDs)
if err != nil {
return nil, err
}
if err := applyCRDs(config, policy, chrt, setOriginVisitor(v2.GroupVersion.Group, obj.Namespace, obj.Name)); err != nil {
return nil, fmt.Errorf("failed to apply CustomResourceDefinitions: %w", err)
}
return upgrade.RunWithContext(ctx, release.ShortenName(obj.GetReleaseName()), chrt, vals.AsMap())
}
// finds the last non-deleted release with the given name
lastRelease, err := u.cfg.Releases.Last(name)
if err != nil {
// to keep existing behavior of returning the "%q has no deployed releases" error when an existing release does not exist
if errors.Is(err, driver.ErrReleaseNotFound) {
return nil, nil, driver.NewErrNoDeployedReleases(name)
}
return nil, nil, err
} This seems unlikely to happen as helm-controller did check the state of the helmrelease when determing the state. I don't know helm package enough to tell but I guess helm state was changed in between state was determined by flux and helm check the state to perform upgrade so that the release no longer exist Deleting the helm secret worked as helm-controller would determine the release not installed and performs an install instead of upgrade. |
Describe the bug
Here is the config file that I have for creating the
rook-ceph-cluster
as defined here. I can deploy using almost the same layout for therook-ceph
helm chart but therook-ceph-cluster
chart fails.This is the helm repository file:
When I go to deploy, I get the following error, which I cannot for the life of me figure out why.
I can create it manually from the cli using helm by running the following:
So it's not an issue with the helm repository, or with rook.
Any ideas?
Steps to reproduce
Expected behavior
It should just run as expected 🤷
Screenshots and recordings
No response
OS / Distro
Ubuntu -- Jammy
Flux version
flux version 2.2.3
Flux check
► checking prerequisites
✔ Kubernetes 1.27.10+rke2r1 >=1.26.0-0
► checking version in cluster
✔ distribution: flux-v2.2.3
✔ bootstrapped: true
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.37.4
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.2.2
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.2.4
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.2.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta2
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✔ all checks passed
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: