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

Providing Values via chartFileRef #4

Closed
ty-machine opened this issue Jul 2, 2020 · 3 comments
Closed

Providing Values via chartFileRef #4

ty-machine opened this issue Jul 2, 2020 · 3 comments
Labels
area/helm Helm related issues and pull requests area/ux In pursuit of a delightful user experience enhancement New feature or request

Comments

@ty-machine
Copy link

ty-machine commented Jul 2, 2020

Per the roadmap git chart sources are a non goal.

Migrate users that are using Helm charts from Git

In deprecating this we also will be losing the the chartFileRef option for providing values.

Values from chart files are only supported for charts from a Git repository.

Some users (like myself) have used git chart sources specifically to enable this despite agreeing that chart repository is a better solution. Many public charts like redis are published with this method for differentiating environments. While it may be messy, It would be possible to include this functionality for chart repository sources as helm does download the tar.

@stefanprodan stefanprodan added the enhancement New feature or request label Jul 9, 2020
@hiddeco hiddeco added area/helm Helm related issues and pull requests area/ux In pursuit of a delightful user experience labels Jul 13, 2020
@stefanprodan
Copy link
Member

stefanprodan commented Jul 22, 2020

Changing the values.yaml to a different file inside the chart could be a property of the HelmChart template e.g.:

apiVersion: helm.fluxcd.io/v2alpha1
kind: HelmRelease
metadata:
  name: redis
  namespace: cache
spec:
  interval: 10m
  releaseName: redis
  chart:
    name: redis
    sourceRef:
      kind: HelmRepository
      name: stable
    valuesFile: "values-production.yaml" # defaults to values.yaml

One way to achieve this, would be for source-controller to overwrite the values.yaml with the content of the yaml from valuesFile inside the chart tarball.

@monotek
Copy link

monotek commented Sep 8, 2020

Would be nice to be able to use a values file outside of the chart tarball, which is in the same directory as the helmrelease file.
Motivation is that with a separate values.yaml file doing manual helm upgrade / install / template / lint would be easier.

At the moment i have to use third party tools like yq to do something like this:

yq r /dir/helmrelease.yaml 'spec.values' | helm template . -f -

@hiddeco
Copy link
Member

hiddeco commented Sep 8, 2020

Would be nice to be able to use a values file outside of the chart tarball, which is in the same directory as the helmrelease file.
Motivation is that with a separate values.yaml file doing manual helm upgrade / install / template / lint would be easier.

We are not going to support this, as the spec.chart is a template for a HelmChart that is created by the helm-controller but actually reconciled by the source-controller (which produces an artifact for it, to be used as the Helm chart for the release). There is thus no relation between the source of the HelmRelease and the chart.sourceRef defined in the above example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm Helm related issues and pull requests area/ux In pursuit of a delightful user experience enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants