argoproj / argo-cd

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

Random 401 using hard refresh againt OCI repository #10298

Open dpiraud opened 2 years ago

dpiraud commented 2 years ago

Checklist:

Describe the bug

When using the "hard-refresh" btn on ArgoCD, I randomly get 401 error. If no 401 error occurred, everything works fine.

We declare severals OCI repo for our HelmChart in our ArgoCD:

registry.net/staging-team1/helm team1Login team1Password
registry.net/staging-team2/helm team2Login team2Password
registry.net//staging-team3/helm team3Login team3Password
...

It seems that ArgoCD something pick the wrong login/password: I was able to confirm this idea by changing our configuration to use the same login/password (Of a user with right on all repo) for all our ArgoCD OCI repository

registry.net/staging-team1/helm masterLogin masterPassword
registry.net/staging-team2/helm masterLogin masterPassword
registry.net/staging-team3/helm masterLogin masterPassword
...

Doing this, I get no more 401 when using "hard refresh"

Expected behavior

When i hit hard refresh, ArgoCD pick the "good" credentials of the app oci repo ( More precisely: ArgoCD should perform a "helm login" with the right creds ;) )

Screenshots

image

Version

2.4.4
fe80 commented 2 years ago

Hello,

Same issue on 2.4.11

mmerickel commented 2 years ago

I believe the issue is with helm itself, I opened a bug report here https://github.com/helm/helm/issues/11286. You can see in the argocd-repo-server log output the trace where it does a helm registry login multiple times - if you remove the other registries then things work.

dpiraud commented 2 years ago

Sounds good, thx!