-1

We have 2 helm-charts:

  1. helm-chart-A which deploys:
    • A-config-map
    • A-deployment
    • A-secret
  2. helm-chart-B which deploys:
    • B-config-map
    • B-statefulset
    • B-secret

Is it possible to create an empty super hart which include the above as dependencies and deploy them?

e.g

helm-chart-C:

  • Chart.yaml:
    • dependencies:
      • helm-chart-A
      • helm-chart-B

--> Output:

  • Deploy helm-chart-A and helm-chart-B

In case yes, is it possible to specify as well the "helm.sh/hook-weight"? e.g. helm-chart-B has to be deployed before A

I use an example 2 charts but we have 7/8 charts that we want to deploy with an "helm super chart"

Fabry
  • 1,498
  • 4
  • 23
  • 47
  • What happens if you try to deploy this `helm-chart-C`; are there any specific problems you run into? In practice this could encounter trouble if the charts A and B have similar dependencies, in that Helm will only install the dependency once and the two charts must have compatible version constraints. – David Maze Aug 12 '22 at 10:28

2 Answers2

2

yes. Exactly the way you said:

helm-chart-C:
    Chart.yaml:
        dependencies:
            helm-chart-A
            helm-chart-B

as for ordering. Other than the hack of using helm hook's. There is none. Your charts shouldn't need to care about each other. Else they should be the same chart

testfile
  • 2,145
  • 1
  • 12
  • 31
2

You can create a new chart C with two subcharts A and B, or just add them as dependencies, but you cannot easly control the execution order between the two charts (deploying all resources from A before B), you will have something like:

  • A-Namespace
  • B-Namespace
  • A-StatefulSet
  • B-ReplicaSet
  • A-Service
  • B-Service

To force helm to deploy the resources (not the charts) in some order, you can use helm hooks weights.

Hussein Awala
  • 4,285
  • 2
  • 9
  • 23