From c3a3dd7e2ba8d765e2670baecaecc904817972c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ceyhun=20K=C4=B1ral?= Date: Thu, 12 Feb 2026 13:14:45 +0300 Subject: [PATCH] Support private Kustomize remote bases (#475) Fix manifest generation for ArgoCD applications that use Kustomize bases from private repositories by retrieving repository configuration with enriched credentials from ArgoCD's database. - Retrieve repository with credentials using argoDB.GetRepository() - Use enriched repository instead of basic RepoURL - Enables ArgoCD to authenticate when fetching private remote bases Fixes #475 --- pkg/argo_client/manifests.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/argo_client/manifests.go b/pkg/argo_client/manifests.go index 0149a36f..a774f84f 100644 --- a/pkg/argo_client/manifests.go +++ b/pkg/argo_client/manifests.go @@ -213,8 +213,16 @@ func (a *ArgoClient) generateManifests(ctx context.Context, app v1alpha1.Applica app.Spec.Sources = append([]v1alpha1.ApplicationSource{source}, refs...) + // Get repository with enriched credentials from ArgoCD database + enrichedRepo, err := argoDB.GetRepository(ctx, source.RepoURL, app.Spec.Project) + if err != nil { + return nil, fmt.Errorf("failed to get repository with credentials: %w", err) + } + log.Debug().Msgf("using repository with credentials for %s", source.RepoURL) + + // Use enriched repo instead of basic repo URL q := repoapiclient.ManifestRequest{ - Repo: &v1alpha1.Repository{Repo: source.RepoURL}, + Repo: enrichedRepo, Revision: source.TargetRevision, AppLabelKey: argoSettings.AppLabelKey, AppName: app.Name,