enix / helm-charts

A collection of Helm packages brought to you by Enix Monkeys :monkey_face:
https://charts.enix.io
Apache License 2.0
56 stars 19 forks source link

Charts are not scoped #42

Closed rwin-novo closed 3 years ago

rwin-novo commented 3 years ago

What I mean by this:

the values.yaml files in the charts are not something like:

---
x509-exporter:
  imagePullSecrets: []
  image:
    repository: enix/x509-exporter
  [...]

and

---
netbox:
  kind: StatefulSet
  statefulSet:

but they just simply contain the key:values without any scope.

Why is this a problem? For example we maintain a common values.yaml structure for all our Helm charts, so that the prometheus rules and the cert-manager configuration is in one common file; one can then use this single file with Helm and not dozens of values.yaml files for all the Helm charts.

Not limiting the chart's values to a scope means that it's not possible to have more than one chart's key:value pairs in one values.yaml file. We can't use something like repository: enix/x509-exporter in this common values.yaml file since it would affect all similarly non-scoped charts' repository key.

I hope I was able to describe the problem. I'd argue it's very common to use a scope for a chart, actually I know only one single chart which has the same issue (velero from vmware-tanzu) and every other chart I've ever seen has this main scope.

It'd be nice to adjust the charts like this if you're open for it.

NaPs commented 3 years ago

Hi @rwin-novo,

What you are suggesting is going against Helm best practices (eg: helm create do not provide default values.yaml file with this kind of scoping). Most charts don't do that. You are not supposed to use the same values file for different helm releases. Finally, scoping is already used with subcharts values definition.

If you are looking for a way to describe an entire helm stack into a single file, look at the Helmfile project.