0

I have created a helm directory called clickhouse:

enter image description here

Inside the template subdirectory I have a crd.yaml (kind: CustomResourceDefinition) which has to be run before the installation.yaml (kind: ClickHouseInstallation). Right now the installation.yaml is run first when I run the command

$ helm upgrade -i clickhouse ./charts/clickhouse

How do I change the order?

Notes:

I noted that there's a static order by reading through this thread. Since ClickHouseInstallation is not a part of that list I'm curious of how helm orders it and how to change that order.

Also here's the yaml files

crd.yaml

installation.yaml

1 Answers1

1

I think you can try to use Helm hooks like

annotations:
  "helm.sh/hook": post-install

Let your crd.yaml have pre-install and then your installation.yaml could have post-install. Please look through the docs for Helm hooks, there might be some downsides in regards to what you want to achieve.

Another way to solve this (might be trivial and not so elegant) would be creating a separate helm chart for the installation.yaml and then just run the crd chart first.

DLO
  • 914
  • 1
  • 13
  • 30