flux2: HelmRelease.helm.toolkit.fluxcd.io is invalid: spec.chart: Required value - when using spec.chartref

Describe the bug

Hi all, I am trying to install spark from oci: https://artifacthub.io/packages/helm/bitnami/spark

apiVersion: v1
kind: Namespace
metadata:
  name: spark
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
  name: bitnami-spark
  namespace: flux-system
spec:
  interval: 10m
  url: oci://registry-1.docker.io/bitnamicharts/spark
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
  name: spark
  namespace: spark
spec:
  interval: 5m
  releaseName: spark
  chartRef:
    kind: OCIRepository
    name: bitnami-spark
    namespace: flux-system
  values:

but getting the following error:

Detecting drift for revision dev@sha1:db3ca47946e8fad25dfed4d00ae7278f568abeee with a timeout of 9m30sHelmRelease/spark/spark dry-run failed (Invalid): HelmRelease.helm.toolkit.fluxcd.io “spark” is invalid: spec.chart: Required value

Which is pretty strange since in the docs it says never to use both spec.chart and spec.chartRef together… https://fluxcd.io/flux/components/helm/helmreleases/#chart-reference image

I must be missing something here… Would love for assistance!

Steps to reproduce

install flux, apply manifests

Expected behavior

installed

Screenshots and recordings

No response

OS / Distro

Ubuntu 22.04

Flux version

flux: v2.4.0

Flux check

flux check ► checking prerequisites ✔ Kubernetes 1.30.6+k3s1 >=1.28.0-0 ► checking version in cluster ✔ distribution: flux-v2.4.0 ✔ bootstrapped: true ► checking controllers ✔ helm-controller: deployment ready ► ghcr.io/fluxcd/helm-controller:v1.1.0 ✔ kustomize-controller: deployment ready ► ghcr.io/fluxcd/kustomize-controller:v1.4.0 ✔ notification-controller: deployment ready ► ghcr.io/fluxcd/notification-controller:v1.4.0 ✔ source-controller: deployment ready ► ghcr.io/fluxcd/source-controller:v1.4.1 ► checking crds ✔ alerts.notification.toolkit.fluxcd.io/v1beta3 ✔ buckets.source.toolkit.fluxcd.io/v1 ✔ gitrepositories.source.toolkit.fluxcd.io/v1 ✔ helmcharts.source.toolkit.fluxcd.io/v1 ✔ helmreleases.helm.toolkit.fluxcd.io/v2 ✔ helmrepositories.source.toolkit.fluxcd.io/v1 ✔ 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

github

Container Registry provider

docker

Additional context

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 29 (12 by maintainers)

Most upvoted comments

@stefanprodan in a fresh cluster this issue was gone, you might close the issue

maybe is has to do with the azure extension for flux which was installed in both cluster

For sure, I suggest opening a ticket with Azure support.

Looks like you need to scrap this cluster, your theory with older versions “stuck in etcd” seems valid.