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 chart fails for Flux HelmRelease #262

Open
piotrjez opened this issue Nov 12, 2024 · 1 comment
Open

Helm chart fails for Flux HelmRelease #262

piotrjez opened this issue Nov 12, 2024 · 1 comment

Comments

@piotrjez
Copy link

Flux HelmChart can't get tags for oci://ghcr.io/dragonflydb/dragonfly-operator/helm, probably because those don't strictly follow the Helm specification:

Non-SemVer names are explicitly disallowed by the Flux system.
This means the v prefix is not allowed.
Happened to others before: fluxcd/helm-controller#670, fluxcd/flux2#3766.

Repro steps:

apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
  name: dragonfly-operator
  namespace: flux-system
spec:
  type: oci
  interval: 15m
  url: oci://ghcr.io/dragonflydb/dragonfly-operator/helm
---

apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: dragonfly
  namespace: dragonfly-system
spec:
  chart:
    spec:
      chart: dragonfly-operator
      version: 1.1.x
      sourceRef:
        kind: HelmRepository
        name: dragonfly-operator
        namespace: flux-system

Output message for flux get helmreleases -n dragonfly-system dragonfly:
HelmChart 'flux-system/dragonfly-system-dragonfly' is not ready: chart pull error: failed to get chart version for remote reference: could not get tags for "dragonfly-operator": unable to locate any tags in provided repository: oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator

Would be nice to push charts for versions without "v" prefix or if it's not possible, there's an option to provide dual-tag policy with and without "v" prefix in versions.

@sysaeon
Copy link

sysaeon commented Nov 15, 2024

@piotrjez - I'm using Flux HelmRelease and had that same error because I didn't specify the version at all. After adding that as version: v1.1.8 it was able to pull the chart and finish deployment.

I agree the v should be dropped.

---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: dragonfly-operator
  namespace: dragonfly-system
spec:
  chart:
    spec:
      chart: dragonfly-operator
      reconcileStrategy: ChartVersion
      version: v1.1.8
      sourceRef:
        kind: HelmRepository
        name: dragonfly-operator
        namespace: flux-system
  interval: 30m0s

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