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 controller seems to encounter an runtime panic (Release Candidate) #3829

Closed
1 task done
samip5 opened this issue Apr 24, 2023 · 2 comments
Closed
1 task done

Comments

@samip5
Copy link

samip5 commented Apr 24, 2023

Describe the bug

It seems that the Helm controller for some reason returns an error with runtime error: invalid memory address or nil pointer dereference.

Steps to reproduce

  1. Install Flux via OCI manifests tag v2.0.0-rc.1.
  2. Try to deploy this app: https://github.com/samip5/k8s-cluster/tree/a01428a663c43ddba52c68a9f223ac972e55a43e/cluster/apps/default/paperless
  3. Helm history doesn't show anything, and helm controller logs:
{"level":"error","ts":"2023-04-24T09:40:24.900Z","msg":"Reconciler error","controller":"helmrelease","controllerGroup":"helm.toolkit.fluxcd.io","controllerKind":"HelmRelease","HelmRelease":{"name":"paperless","namespace":"default"},"namespace":"default","name":"paperless","reconcileID":"2b66570a-d819-4bdc-b798-745bdf78cbf3","error":"panic: runtime error: invalid memory address or nil pointer dereference [recovered]","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:274\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.14.6/pkg/internal/controller/controller.go:235"}

Expected behavior

I would have expected it to tell me what the issue with the helm-release is, and not panic. It does still work with other HRs.

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

N/A

Flux check

► checking prerequisites
✗ flux 0.35.0 <2.0.0-rc.1 (new version is available, please upgrade)
✔ Kubernetes 1.25.6+k3s1 >=1.20.6-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.32.1
✔ image-automation-controller: deployment ready
► ghcr.io/fluxcd/image-automation-controller:v0.32.0
✔ image-reflector-controller: deployment ready
► ghcr.io/fluxcd/image-reflector-controller:v0.27.0
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.0.0-rc.1
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.0.0-rc.1
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.0.0-rc.1
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta2
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1beta2
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta1
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ imagepolicies.image.toolkit.fluxcd.io/v1beta1
✔ imagerepositories.image.toolkit.fluxcd.io/v1beta1
✔ imageupdateautomations.image.toolkit.fluxcd.io/v1beta1
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1beta2
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta2
✔ receivers.notification.toolkit.fluxcd.io/v1beta2
✔ all checks passed

Git provider

Github

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@darkowlzz
Copy link
Contributor

Hi, thanks for reporting the issue. It this looks similar to other reported issues recently which is fixed in fluxcd/helm-controller#672 . The fixed version of helm-controller image is available at https://github.com/fluxcd/helm-controller/pkgs/container/helm-controller/85071966?tag=v0.32.2 . It should be safe to update as I don't see any other unrelated changes in the changelog https://github.com/fluxcd/helm-controller/blob/v0.32.2/CHANGELOG.md .
Can you please give it a try and verify that it fixes the issue?
A new patch release of flux2 with the new helm-controller will be released soon.

@samip5
Copy link
Author

samip5 commented Apr 24, 2023

Hi, it looks like you're correct in that it's fixed in that version.

I updated to that via this https://github.com/samip5/k8s-cluster/blob/c942c40c4e23f0e4d1fd8885849664e96594e2d2/cluster/flux/config/flux.yaml#L54#L60

@samip5 samip5 closed this as completed Apr 24, 2023
FalkWinkler added a commit to FalkWinkler/k3s-gitops that referenced this issue Apr 27, 2023
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

No branches or pull requests

2 participants