argo-cd: Wildcard support in OCI Helm repositories does not work
Checklist:
- I’ve searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- I’ve included steps to reproduce the bug.
- I’ve pasted the output of
argocd version
.
Describe the bug
I try to create an application from an OCI Helm repository with wildcard (*) as version instead of explicitly specifying the version of the chart which fails with the following error:
Unable to create application: application spec for x is invalid: InvalidSpecError: Unable to generate manifests in : rpc error: code = Unknown desc = unable to get tags: failed to get tags: unable to decode json: invalid character '<' looking for beginning of value
As seen here:
When I instead pin the version it does work as expected:
To Reproduce
The repository is Harbor:
Expected behavior
It should work as described in #10641
Screenshots
Version
argocd-server: v2.6.1+3f143c9
BuildDate: 2023-02-08T18:51:05Z
GitCommit: 3f143c9307f99a61bf7049a2b1c7194699a7c21b
GitTreeState: clean
GoVersion: go1.18.10
Compiler: gc
Platform: linux/amd64
Kustomize Version: v4.5.7 2022-08-02T16:35:54Z
Helm Version: v3.10.3+g835b733
Kubectl Version: v0.24.2
Jsonnet Version: v0.19.1
Logs
Paste any relevant application logs here.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 4
- Comments: 34 (12 by maintainers)
https://github.com/argoproj/argo-cd/pull/12554 should fix it
The combination I used before was:
After seeing your suggestion, I updated to latest master and changed form to:
and now it works fine.
Maybe related issue, GHCR and ArgoCD 2.6.1.
I get a 404 trying using this snippet:
and a
rpc error: code = Unknown desc = unable to get tags: failed to get tags: failed tags part: invalid response: 401 Unauthorized {"errors":[{"code":"UNAUTHORIZED","message":"authentication required"}]}
trying to use this:Instead, pinning the
targetRevision: v4.7.8
works fineMaybe related issue, GHCR and ArgoCD 2.6.1, got a 404 error while specifying a wildcard
But when specifying the correct version its working.
Yes, we could do -
helm pull oci://registry.gitlab.com/<path> --version "2.1.*"
and even
helm pull oci://registry.gitlab.com/<path> --version "*"
Nope that’s implemented considering the OCI spec.
Ah, forgot that. Closing again. 😆
@mchudinov, it’s not yet released - it’s due for 2.8. Try the latest master and see if the problem persists.
I’m seeing the same error message as @OpsMaya reported above, but with Azure CR and ArgoCD 2.6.7.
To clarify, is it likely to be the same root cause as the other reports here (with the mention of json in the error message), or is it a separate issue?
Same issue, when upgrading from 2.5.5 to 2.6.1
We are facing somewhat similar issue with Gitlab OCI registry for helm charts.
When we try to use
"*"
in targetRevision to pick the latest helm chart from the OCI registry, we receive the following error -Looking at the code a bit it fails probably here and if we are not wrong, it is implemented considering AWS ECR API specification.
Note that if we use a fixed version in
targetRevision
it does not fail because it skips the GetTags call.Hey @alexef, We use https://artifacthub.io/packages/helm/bitnami/harbor/15.2.2 to deploy our Harbor instance on AKS. Should be quite easy to setup and reproduce with that helm chart. If there is anything else I can do to help with debugging this please tell me.