argoproj / argo-cd

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

Possible issue with Multiple Sources Helm application with custom values file. "Repo not found" #18218

Closed abwelt closed 2 weeks ago

abwelt commented 2 weeks ago

Checklist:

Describe the bug

After successfully deploying an APP for prometheus using a multi source application as per TheDocs manual Sync's of the app via cli or UI result in an error of repo not found. The resource were previously deployed in the cluster, we are retroactively tracking them in argo now. Argo sync's green and is able to discover all resources upon app creation. This seems like it is aware of the chart and able to pull the chart at least initially, but I may be confused as to how argo handles things in this scenario.

I have tried adding the helm repo url to my list of connected repos, resulting in a successful add as well.

To Reproduce

Create an app with the following definition, pointing to a valid git repo with a values.yaml file.

kind: Application
metadata:
  name: prometheus
  namespace: utilities
spec:
  project: utils
  destination:
    server: https://kubernetes.default.svc
    namespace: monitoring
  syncPolicy:
    automated: {}
  sources:
    - chart: prometheus
      repoURL: 'https://prometheus-community.github.io/helm-charts'
      targetRevision: 25.17.0
      helm:
        valueFiles:
        - $values/prometheus/values.yml
    - repoURL: 'git@yourgitdomain.com/repo.git'
      targetRevision: HEAD
      ref: values`

Expected behavior

Sync should be successful

Version

argocd: v2.11.0+d3f33c0
  BuildDate: 2024-05-07T16:21:23Z
  GitCommit: d3f33c00197e7f1d16f2a73ce1aeced464b07175
  GitTreeState: clean
  GoVersion: go1.21.9
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.11.0+d3f33c0
  BuildDate: 2024-05-07T16:01:41Z
  GitCommit: d3f33c00197e7f1d16f2a73ce1aeced464b07175
  GitTreeState: clean
  GoVersion: go1.21.9
  Compiler: gc
  Platform: linux/arm64
  Kustomize Version: v5.2.1 2023-10-19T20:13:51Z
  Helm Version: v3.14.3+gf03cc04
  Kubectl Version: v0.26.11
  Jsonnet Version: v0.20.0

Logs

FATA[0000] rpc error: code = FailedPrecondition desc = error resolving repo revision: rpc error: code = Unknown desc = repository not found
abwelt commented 2 weeks ago

Realise this is a repeat of

https://github.com/argoproj/argo-cd/issues/18209