argoproj / argo-cd

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

ArgoCD tries to `helm repo add` OCI repos when getting Helm dependencies #16674

Open efbicief opened 11 months ago

efbicief commented 11 months ago

Checklist:

Describe the bug

I have an application which deploys a Helm chart defined in git. This chart has a dependency which needs to be pulled from an OCI Helm repository, which I have configured with a repository secret. Syncing the application fails with: Failed to load target state: failed to generate manifest for source 1 of 1: rpc error: code = Unknown desc = Manifest generation error (cached): 'helm repo add helm-oci-repo' failed exit status 1: Error: could not find protocol handler for:

To Reproduce

dependencies:

OCI repos are not supported by helm repo add, but Argo CD tries to add them.

Expected behavior ArgoCD should not attempt to helm repo add any repos with enableOCI: "true" set, instead it should just try to pull using the url (prepended with oci://)

Version

{
    "Version": "v2.9.2+c5ea5c4",
    "BuildDate": "2023-11-20T17:18:26Z",
    "GitCommit": "c5ea5c4df52943a6fff6c0be181fde5358970304",
    "GitTreeState": "clean",
    "GoVersion": "go1.21.3",
    "Compiler": "gc",
    "Platform": "linux/amd64",
    "KustomizeVersion": "v5.2.1 2023-10-19T20:13:51Z",
    "HelmVersion": "v3.13.2+g2a2fb3b",
    "KubectlVersion": "v0.24.2",
    "JsonnetVersion": "v0.20.0"
}

Logs

Paste any relevant application logs here.
mhvelplund commented 7 months ago

Is there a work around for this?

efbicief commented 7 months ago

It seems to work if you put the full repository URL under repository:, eg:

dependencies:
- name: some-chart-name
  version: 1.2.3
  repository: oci://some-oci-repo.com

And if the chart is not at the root of the repo (eg. if charts are indexed by publisher), you can do:

dependencies:
- name: some-chart-name
  version: 1.2.3
  repository: oci://some-oci-repo.com/some/path/in/repo
andrii-korotkov-verkada commented 5 days ago

ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please?