I want to set up a Kubernetes Cluster with multiple Helm Charts installed. I like the idea of having configurations versioned in an Git repository. I'm wondering if there is any tool (or recommended/best practice) of how the state of installed helm charts can be "versioned".
For example, I would like to have a yaml file similar to the following example with multiple helm charts and a tool (that's the tool I'm searching for) which will take care of applying this file to my Kubernetes cluster:
- name: gitlab
chart: gitlab/gitlab-runner
repository: https://charts.gitlab.io
values:
- gitlab-runner/values.yaml
- local/gitlab-runner-override.yaml
namespace: gitlab-runner
- name: metallb
chart: stable/metallb
values:
- metallb/configuration.yaml
...
This way it is possible to manage the contents of the Kubernetes cluster in a programatically way.
Any recommendations?
It looks like helmfile is the solution you need:
Helmfile is a declarative spec for deploying helm charts. It lets you...
Keep a directory of chart value files and maintain changes in version control. Apply CI/CD to configuration changes. Periodically sync to avoid skew in environments.
You can read more about it in this article.
If I understand your requirement correctly, I think you can create a new helm chart, lets say custom-app. Add all the other helm charts as a dependency.
Essentially, create a directory called chart/
inside the helm directory of your new custom app and add the charts to it.
This is one way you could version a collection of charts.