diff options
| author | Cheng Fang <cfang@redhat.com> | 2024-11-14 23:34:40 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-14 23:34:40 -0500 |
| commit | 627381428eb3899596dfcb2d4f646f041c2febce (patch) | |
| tree | 17ec9face79d31bbf3a51e0644e42ff088be41c7 /pkg | |
| parent | 8a156dd243811f45daad7c25fb70e10c15eede04 (diff) | |
chore(deps): upgrade argo-cd from 2.11.7 to 2.13.0 (#936)
Signed-off-by: Cheng Fang <cfang@redhat.com>
Co-authored-by: Jann Fischer <jann@mistrust.net>
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/argocd/gitcreds.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/argocd/gitcreds.go b/pkg/argocd/gitcreds.go index 5dc8e4b..c9ff596 100644 --- a/pkg/argocd/gitcreds.go +++ b/pkg/argocd/gitcreds.go @@ -22,7 +22,7 @@ func getGitCredsSource(creds string, kubeClient *kube.KubernetesClient, wbc *Wri switch { case creds == "repocreds": return func(app *v1alpha1.Application) (git.Creds, error) { - return getCredsFromArgoCD(wbc, kubeClient) + return getCredsFromArgoCD(wbc, kubeClient, app.Spec.Project) }, nil case strings.HasPrefix(creds, "secret:"): return func(app *v1alpha1.Application) (git.Creds, error) { @@ -33,13 +33,13 @@ func getGitCredsSource(creds string, kubeClient *kube.KubernetesClient, wbc *Wri } // getCredsFromArgoCD loads repository credentials from Argo CD settings -func getCredsFromArgoCD(wbc *WriteBackConfig, kubeClient *kube.KubernetesClient) (git.Creds, error) { +func getCredsFromArgoCD(wbc *WriteBackConfig, kubeClient *kube.KubernetesClient, project string) (git.Creds, error) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() settingsMgr := settings.NewSettingsManager(ctx, kubeClient.Clientset, kubeClient.Namespace) argocdDB := db.NewDB(kubeClient.Namespace, settingsMgr, kubeClient.Clientset) - repo, err := argocdDB.GetRepository(ctx, wbc.GitRepo) + repo, err := argocdDB.GetRepository(ctx, wbc.GitRepo, project) if err != nil { return nil, err } |
