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

flux cli OCI helm repo reconcile panic #2857

Closed
1 task done
uderik opened this issue Jun 21, 2022 · 2 comments · Fixed by fluxcd/source-controller#792
Closed
1 task done

flux cli OCI helm repo reconcile panic #2857

uderik opened this issue Jun 21, 2022 · 2 comments · Fixed by fluxcd/source-controller#792

Comments

@uderik
Copy link

uderik commented Jun 21, 2022

Describe the bug

#flux reconcile source helm cprc

► annotating HelmRepository cprc in flux-system namespace
✔ HelmRepository annotated
◎ waiting for HelmRepository reconciliation
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x192c1a1]

goroutine 1 [running]:
main.helmRepositoryAdapter.successMessage({0x21dfc98?})
        /home/runner/work/flux2/flux2/cmd/flux/reconcile_source_helm.go:49 +0x21
main.reconcileCommand.run({{{0x1e7c81c, 0xe}, {0x1e7833e, 0xb}, {{0x1e926f2, 0x18}, {0x1e70362, 0x7}}}, {0x21dfc98, 0xc000446a80}}, ...)
        /home/runner/work/flux2/flux2/cmd/flux/reconcile.go:138 +0xa0b
github.com/spf13/cobra.(*Command).execute(0x318bf00, {0xc0003e96d0, 0x1, 0x1})
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0x3190780)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3b4
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main()
        /home/runner/work/flux2/flux2/cmd/flux/main.go:160 +0x32
        

Steps to reproduce

helm repo

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: cprc
  namespace: flux-system
spec:
  interval: 1m
  timeout: 60s
  type: oci
  url: oci://harbor/mirror/

run flux reconcile source helm cprc

Expected behavior

Helm release with this repo return:
Helm Chart 'flux-system/kafka-cp-schema-registry' is not ready

helmchart:

сhart pull error: chart pull error: failed to get chart version for  remote reference: invalid_reference: invalid repository

but i don't see any requests from flux in harbor logs

Screenshots and recordings

No response

OS / Distro

ubuntu 20.04.04

Flux version

flux: v0.31.1

Flux check

► checking prerequisites
✔ Kubernetes 1.22.9-eks-a64ea69 >=1.20.6-0
► checking controllers
✔ all checks passed

Git provider

Gitlab

Container Registry provider

Harbor

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@somtochiama
Copy link
Member

somtochiama commented Jun 22, 2022

Hey @uderik ,
The helm repository only validates the OCI URL and tries to log in if needed. Still, the panic shouldn't happen and I have opened a pull request to fix it.
Is this the exact URL used oci://harbor/mirror/? and Can you try removing the extra slash at the end?

@uderik
Copy link
Author

uderik commented Jun 22, 2022

Is this the exact URL used oci://harbor/mirror/? and Can you try removing the extra slash at the end?

Without slash :

Normal ChartPullSucceeded 108s source-controller pulled 'cp-schema-registry' chart with version '0.1.0'

thanks

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