-
I have a HelmRelease which refers to a HelmChart in a HelmRepo. I need to pass it a fairly long (~800 lines long The documentation here says to use a
This is a little confusing.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
You have two options to configure it on the
There is no way to refer to an actual Note that you only need to include values which differ from the chart defaults, as they are merged on top (like |
Beta Was this translation helpful? Give feedback.
-
I followed the guidance here and it seems to works pretty well: https://fluxcd.io/flux/guides/helmreleases/#refer-to-values-in-configmaps-generated-with-kustomize |
Beta Was this translation helpful? Give feedback.
-
I agree with #2919 (reply in thread) and I think that valuesFrom should absolutely be able to pull from a GitRepository. Our use case is having separate folders for the infra for different deployments, and we would like the values files to live in those folders rather than in the chart at the top level. Example:
Unfortunately to make a configmap and keep it synced to the cluster, we would need to add an extra kustomization.yaml and Kustomization resource to use it, which just feels like unneeded overhead. Pulling from a Source kind like a GitRepo seems like it would fit in perfectly with the rest of the Flux and GitOps paradigms, and before I looked into it I naturally assumed that
would be supported. |
Beta Was this translation helpful? Give feedback.
-
Here's what I do: ---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helmrelease.yaml
- helmrepository.yaml
configMapGenerator:
- name: foo-helm-values
namespace: foo
files:
- values.yaml
options:
# not apparently supported by the flux HelmRelease
disableNameSuffixHash: true
immutable: false
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: foo
namespace: foo
spec:
interval: 10m
timeout: 5m
chart:
spec:
chart: foo
version: "1.3.3.7"
sourceRef:
kind: HelmRepository
name: foo
interval: 5m
releaseName: foo
install:
remediation:
retries: 3
upgrade:
remediation:
retries: 3
test:
enable: true
driftDetection:
mode: enabled
ignore: []
valuesFrom:
- kind: ConfigMap
name: foo-helm-values
valuesKey: values.yaml |
Beta Was this translation helpful? Give feedback.
You have two options to configure it on the
HelmRelease
:.spec.values
of theHelmRelease
, which supports structured YAML.ConfigMap
orSecret
:There is no way to refer to an actual
values.yaml
file, because the controller can only look at Kubernetes API objects (like aConfigMap
,Secret
and theHelmRelease
itself), and has no means to retrieve any file reference unless it is included with the chart. In which case you can configure it on theHelmChart
, see.spec.valuesFiles
for more information on this.Note that you only need to include values w…