chart-testing-action icon indicating copy to clipboard operation
chart-testing-action copied to clipboard

dependency chart requires adding repo definition first

Open fty4 opened this issue 3 years ago • 1 comments

Hello everyone,

I just tested this action and find it very useful.

When using the ct install inside a workflow I have a problem with the dependencies. The chart that will be installed depends on another chart and Helm expects the repository already be present.

Here is the message from the run:

Error message
Installing charts...
Version increment checking disabled.

------------------------------------------------------------------------------------------------------------------------
 Charts to be processed:
------------------------------------------------------------------------------------------------------------------------
 mychart => (version: "0.2.3", path: "./")
------------------------------------------------------------------------------------------------------------------------

Error: no repository definition for [https://chart.url/.](https://chart.url/) Please add the missing repos via 'helm repo add'
Error: Error installing charts: Error building dependencies for chart 'mychart  => (version: "0.2.3", path: "./")': Error waiting for process: exit status 1
------------------------------------------------------------------------------------------------------------------------
No chart changes detected.
------------------------------------------------------------------------------------------------------------------------
Error installing charts: Error building dependencies for chart 'mychart  => (version: "0.2.3", path: "./")': Error waiting for process: exit status 1
Error: Process completed with exit code 1.

In my local dev environment this repo to the chart is already added - but inside the runner not. Is there any best practice how the charts can be added automatically (by ct?)?

Currently my approach would be to read out all dependencies.*.repository values from the Chart.yaml and add them in an extra step via bash.

fty4 avatar May 03 '22 17:05 fty4

if the dependent chart is public and has a release for that you can just add it in the config.

like

chart-repos:
  - ingress-nginx=https://kubernetes.github.io/ingress-nginx
  - sigstore=https://sigstore.github.io/helm-charts

cpanato avatar Sep 27 '22 12:09 cpanato