argo-cd: Unable to use OCI Registry with sub helm charts
Describe the bug You cannot create a new app which uses a GIT repo URL as a source and use a sub helm chart with an OCI Registry. The Chart.yaml looks like this:
apiVersion: v2
name: les-service
type: application
version: 1.0.0
dependencies:
- name: les-service
version: "1.0.0"
repository: oci://registry.app.corpintra.net/les
To Reproduce See screenshot
Expected behavior The sub helm chart needs to work with the OCI registry like before with a chart repo URL --> https://registry.app.corpintra.net/chartrepo/les
Screenshots
Version v2.6.1+3f143c9
Logs
Unable to create application: application spec for ass is invalid: InvalidSpecError: Unable to generate manifests in env: rpc error: code = Unknown desc = helm dependency build failed exit status 1: Error: could not download oci://registry.app.corpintra.net/les/les-service: failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://s3-edc.emea.svc.corpintra.net/edcs3dhccaasprodb/docker/registry/v2/blobs/sha256/24/2431b3f41cb1c457ca3828492ab626f446096b6205e297694a913e8e534416c2/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=7cbc312f5c926f7fc1ad%2F20230113%2Feddhcbuckets%2Fs3%2Faws4_request&X-Amz-Date=20230113T153231Z&X-Amz-Expires=1200&X-Amz-SignedHeaders=host&X-Amz-Signature=e9c0e391e10a05307d4a27286ccec4c46553f5fba7fb4751a355fefbdec7c549": Forbidden
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 15
- Comments: 15 (4 by maintainers)
Commits related to this issue
- adding examples for argocd with oci. dependent subchart not working https://github.com/argoproj/argo-cd/issues/12436 — committed to trevorbox/gitops-example-iac-go by trevorbox 10 months ago
Hi, I encounter very similar error that is described in origin of this thread and also in thread #11717.
After upgrade from ArgoCD v2.7.7 to v2.7.8 (and any upper version, my main destination is latest v2.8.2) I see this error
(v2.8.0+)
(v2.7.8-2.7.X)
at my Applications which depend on some Helm Chart in OCI repository. When I create directly Application from OCI repo, then Argo will download and build Helm Chart correctly. But when it is depended in some parent Chart, then Argo cannot download it during build and throw this error.
Repository seems to be OK.
Project hase assigned this repository as source repository.
This is what my helm dependenci definition looks like
And this is what my repository secret for Argo looks like
Is there anyone still working on this problem? And can it help with debugging and fixing?
I’ve been digging through all of the related issues that I can find on this, and I’m in the same position as others.
Our scenario:
helm dependency build
fails with a403
due to an anonymous token being passedExpectation:
Since the pod(s) running ArgoCD applications have workload identities granted via IAM, we should not need to pass credentials explicitly. The fact that the pod has proper bindings to IAM means that the request should essentially be possible by using the access token method where the token is granted by the GCP metadata server upon request.
Reference: https://cloud.google.com/artifact-registry/docs/helm/authentication
Related: https://github.com/argoproj/argo-cd/pull/12554 https://github.com/argoproj/argo-cd/issues/12392
I’m currently facing exactly the same problem as described by @jascsch We’re also forced to use OCI but when I try to use it as dependency, I’m also always getting a forbidden message, although it’s public and I can fetch it using
helm pull
.So I also think that this should be an issue of argo. Fixing this issue is very appreciated and import for me, too.
We have a workaround for this issue. Instead of using a Chart.yaml file we decided to specify multiple sources and reference the helm chart as a git repo like this:
I have a workaround for this issue that applies to GCP / Google Artifact Registry when using workload identities:
gcloud
:Dockerfile
argo-cd-repo-server
(example given for helm)values.yaml
helm.passCredentials
for your application managing deployments