charts-syncer icon indicating copy to clipboard operation
charts-syncer copied to clipboard

Failure syncing subcharts from different registries

Open LP0101 opened this issue 3 years ago • 3 comments
trafficstars

When trying to sync a chart with subcharts in a different remote registry, the sync fails with no chart name found.

For example, trying to sync kube-prometheus-stack, it fails copying grafana, which is stored in a separate repo.

Example config:

source:
  repo:
    kind: HARBOR
    url: https://prometheus-community.github.io/helm-charts
target:
  repoName: myrepo
  containerRegistry: k8s.container.registry.io
  containerRepository: repository/demo/k8s
  repo:
    kind: OCI
    url: https://<REDACTED>.azurecr.io/helm
    auth:
      username: "<REDACTED>"
      password: "<REDACTED>"
charts:
  - kube-prometheus-stack

When running charts-syncer sync, I get this:

0222 16:19:31.882577 101820 index.go:164] unable to load "kube-prometheus-stack-32.2.1" chart: invalid "grafana-6.21.5" chart dependency: getting grafana-6.21.5 from index file: no chart name found

With the same error for each version it tries to pull. This also happens with other charts with subcharts stored in different registries.

LP0101 avatar Feb 22 '22 21:02 LP0101

+1 We need to be able to specify multiple source repos to solve this problem.

Lex45x avatar Apr 22 '22 09:04 Lex45x

Hello @LP0101!

I am glad you discovered this bug. Sadly, we don't plan to add support for multiple source chart repositories at the moment. However, we will be happy to review and discuss any possible implementation you can send as PR.

jotadrilo avatar May 10 '22 10:05 jotadrilo

Hi all ! I have implemented a solution to this. I will open a PR in the next few hours.

chrissgyulev avatar Oct 19 '22 11:10 chrissgyulev