argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.46k stars 5.3k forks source link

Helm chart dependency repository: @name does not work with oci:// repositories #9592

Open nan-coupa opened 2 years ago

nan-coupa commented 2 years ago

Checklist:

Describe the bug

ArgoCD does not support the combination of:

To Reproduce

See e2e PR example: https://github.com/argoproj/argo-cd/pull/9591/files

Helm Chart:

apiVersion: v2
name: helm-oci-with-dependencies
version: 1.0.0
dependencies:
  - name: helm-values
    repository: "@myrepo"
    version: 1.0.0

myrepo is created per integration tests e2e/fixtures/repos/repos.go:

func AddHelmOCIRepo(name string) {
    args := []string{
        "repo",
        "add",
        fixture.HelmOCIRegistryURL,
        "--type", "helm",
        "--name", name,
        "--enable-oci",
    }
    errors.FailOnErr(fixture.RunCli(args...))
}

Expected behavior

ArgoCD should support Helm chart repository: @myrepo syntax when said repository uses oci:// url.

Screenshots

Version

This is the local running version:

$ argocd --server argocd.tools.coupadev.com version
argocd: v2.3.4+ac8b7df.dirty
  BuildDate: 2022-05-22T11:56:25Z
  GitCommit: ac8b7df9467ffcc0920b826c62c4b603a7bfed24
  GitTreeState: dirty
  GoVersion: go1.18.2
  Compiler: gc
  Platform: darwin/amd64

argocd-server: v2.2.5+8f981cc
  BuildDate: 2022-02-05T01:33:25Z
  GitCommit: 8f981ccfcf942a9eb00bc466649f8499ba0455f5
  GitTreeState: clean
  GoVersion: go1.16.11
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: v0.13.1
  Kustomize Version: v4.2.0 2021-06-30T22:49:26Z
  Helm Version: v3.7.1+g1d11fcb
  Kubectl Version: v0.22.2
  Jsonnet Version: v0.17.0

Logs

PR #9591 e2e test error message same as local test results: https://github.com/argoproj/argo-cd/runs/6763941271?check_suite_focus=true#step:16:8347

Error: no repository definition for @myrepo. Please add them via 'helm repo add'\"" execID=d9dab
nan-coupa commented 2 years ago

Related to #7346 and comment: https://github.com/argoproj/argo-cd/issues/7436#issuecomment-1146480759

albertogdd commented 2 years ago

@nan-coupa Any updates about this issue? We ended up having the same problem in my team

nan-coupa commented 1 year ago

@albertogdd, afaik still an issue since the PR is still failing after a rebase to the lastest commit. We ended up using ghcr as an OCI registry instead of trying to use the ArgoCD feature.

mariusz-jasinski commented 1 year ago

It isn't working still (image v2.7.9). Harbor supports native oci repository . It's important to support oci protocol inside ArgoCD.

crenshaw-dev commented 1 year ago

Looks like this error message comes from Helm itself. Which is weird. We just call the helm CLI. I'm not sure why this config is producing an error in Argo CD but (presumably) not Helm.

mariusz-jasinski commented 1 year ago

So it is clear for me.

In my chart oci repository address is running. good example:

dependencies:
  - name: redis-commander
    version: "0.3.0"
    repository: "oci://registry.dev.company.pl/test-ba"

Oci repo alias has not supported by HELM ! Please read https://helm.sh/docs/topics/registries/

failed example:

dependencies:
  - name: redis-commander
    version: "0.3.0"
    repository: "@oci-alias"
sll552 commented 1 year ago

There is https://github.com/helm/helm/pull/11771 and https://github.com/helm/community/pull/259 btw