Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion pkg/argo_client/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading