GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
14.93k stars 1.62k forks source link

Helm: subcharts are downloaded again at every execution #8287

Open KoltesDigital opened 1 year ago

KoltesDigital commented 1 year ago

I'm using Helm. My service needs a DB so I added postgresql as a chart dependency.

The subchart is downloaded once (helm dependency build) and corresponding .tgz file is located in the charts subfolder.

However, every time I launch skaffold dev, the file is downloaded again.

Expected behavior

The file is already there, there's nothing to do (regarding subcharts).

Actual behavior

Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading postgresql from repo https://charts.bitnami.com/bitnami
Deleting outdated charts

A subfolder tmpcharts appears for less than a second.

Information

Steps to reproduce the behavior

  1. git clone ... && cd skaffold/examples/helm-deployment

  2. Add the following in charts\Chart.yaml:

    dependencies:
      - name: postgresql
        version: 12.1.3
        repository: https://charts.bitnami.com/bitnami
  3. cd charts && helm dependency build && cd .. You may need to helm repo add bitnami https://charts.bitnami.com/bitnami first. Observe that charts\charts\postgresql-12.1.3.tgz is created.

  4. skaffold dev Observe that postgresql is downloaded again.

ericzzzzzzz commented 1 year ago

Here is some context about helm dep build #116 , we also have a flag to skip build dependencies under release stanza

deploy:
  helm:
    releases:
    - name: xxx
      .... 
      skipBuildDependencies: true