How to automatically spin n-number of helm deployments from a single helm chart

7/10/2019

I have a meta helm chart which wraps up several charts:

meta-helm-chart

.
|-- Chart.yaml
|-- README.md
|-- charts
|-- dashboards
|-- deployment.yaml
|-- templates
`-- values.yaml

I have like 6 sub-helm charts in the folder charts/.

tree charts/ -L 1
charts/
|-- chart-1
|-- chart-2
|-- chart-3
|-- chart-4
|-- prometheus-rabbitmq-exporter
`-- chart-6

When opening main values.yaml

...
...
rabbitmqTarget 10.20.30.40
...

In this fashion prometheus-rabbitmq-exporter helm chart will be deployed and RabbitMQ at IP address 10.20.30.40 will be scraped.

What I am trying to do:

I would like to have my values.yaml:

...
...
rabbitmqTarget [10.20.30.40, 50.60.70.80]
...

Unfortunately [RabbitMQ prometheus exporter] (https://github.com/kbudde/rabbitmq_exporter) can't scrape more targets.

Can anybody advise how to schedule as many deployments as specified in rabbitmqTarget [10.20.30.40, 50.60.70.80] ??? simply by using helm chart ?

-- user2156115
kubernetes
kubernetes-helm
rabbitmq

1 Answer

7/10/2019

To my knowledge there is no way to do this "simply by using helm". You would need some sort of wrapper / script to run multiple helm installs.

-- switchboard.op
Source: StackOverflow