Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Helm managing a collection of services

I have a Kubernetes cluster that runs a number of independent, discrete services. I want to use helm to deploy them, and I have made a helm chart for every individual resource.

However, now I want to be able to deploy the cluster as a single entity, but it is not clear to me how helm supports stitching together multiple charts.

When I look at example repos, they simply have every single template file in the template folder of a single chart, and then a giant, sprawling Values.yaml file.

To me, that seems unwieldly, especially crawling around a 2000 line Values.yaml looking for settings.

Is there any way to take a folder structure that looks like this:

helm
|____ Service1
      |_______ values.yaml
      |_______ templates
      Service2
      |_______ values.yaml
      |_______ templates
      Service3
      |_______ values.yaml
      |_______ templates

And package it into one deployment without manually merging and de-duping the files and values?

like image 331
mstorkson Avatar asked Jul 26 '18 18:07

mstorkson


1 Answers

Use helm subcharts

You'd need to have something like a meta-chart, myapps. Then you'd add a requirements.yaml file like so:

# myapp/requirements.yaml
dependencies:
  - name: Service1
    repository: http://localhost:10191
    version: 0.1.0
  - name: Service2
    repository: http://localhost:10191
    version: 0.1.0
  - name: Service3
    repository: http://localhost:10191
    version: 0.1.0
like image 103
jaxxstorm Avatar answered Sep 18 '22 02:09

jaxxstorm