helm / chart-testing

CLI tool for linting and testing Helm charts
Apache License 2.0
1.3k stars 210 forks source link

How to skip/ignore "install" for some selected charts? #256

Closed max-rocket-internet closed 3 years ago

max-rocket-internet commented 4 years ago

Is this a request for help?: Yes (or a feature request)

Version of Helm and Kubernetes: v2.16.x with k8s 1.15/1.16

What happened:

Some charts have very complicated dependencies. Like perhaps an application requires PostgreSQL and Redis in order to run, otherwise the pods CrashLoopBackOff.

It can be quite difficult to get the chart to function with ct install even with setting up requirements.yaml to install dependencies (if possible)

Is there a way we can simply exclude a chart from ct? Maybe something like this?

chart-dirs:
  - stable
install-ignore:
  - stable/cachet

Or maybe a file like stable/cachet/.ct_skip_install?

EricLemieux commented 3 years ago

If you are running ct install you can use --excluded-charts, which can be set as an argument or within the ct configuration file. If you are trying to lint and install you would probably have to run the commands separately rather than together with lint-and-install

https://github.com/helm/chart-testing/blob/ec7b0c779ba3fd1d58ea5489e2a4a15acc2e35f8/pkg/config/test_config.yaml#L20-L21

https://github.com/helm/chart-testing/blob/ec7b0c779ba3fd1d58ea5489e2a4a15acc2e35f8/ct/cmd/root.go#L71-L73

max-rocket-internet commented 3 years ago

you can use --excluded-charts,

OK this works. Thanks @EricLemieux