Is it recommended to use kustomize after helm?

Viewed 1970

Sometimes when I use helm charts, not all things I want to modify are usable with the given values. Is it practical to use kustomize to modify the rendered helm chart?
So like this:
chart -> helm template -> kustomize -> kubectl deploy

1 Answers

We do use it sometimes. You can use Helm directly in Kustomize with the helmCharts plugin. In my example, values-prod.yaml has to be in the same directory as the kustomization.yaml. namespace: custom-metallb will override namespace: metallb for example.

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: custom-metallb

helmCharts:
- name: metallb
  namespace: metallb
  releasename: metallb
  repo: https://metallb.github.io/metallb
  version:  0.10.2
  ValuesFile: values-prod.yaml

To be honest, the documentation is not that great, but you can find the arguments here: https://github.com/kubernetes-sigs/kustomize/blob/master/api/types/helmchartargs.go

Documentation from kustomize: https://github.com/kubernetes-sigs/kustomize/blob/master/examples/chart.md

Related