Home > Blockchain >  Helm super chart
Helm super chart

Time:08-11

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"

CodePudding user response:

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

CodePudding user response:

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.

  • Related