Skip to content

Commit

Permalink
Use status instead of spec for determining source types (argoproj-lab…
Browse files Browse the repository at this point in the history
…s#772)

Signed-off-by: Jason Parraga <[email protected]>
Co-authored-by: Cheng Fang <[email protected]>
  • Loading branch information
Sovietaced and chengfang authored Jul 16, 2024
1 parent e4270b8 commit 2bf4b0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,12 @@ func getApplicationSourceType(app *v1alpha1.Application) v1alpha1.ApplicationSou
}

if app.Spec.HasMultipleSources() {
for _, s := range app.Spec.Sources {
if s.Helm != nil {
for _, st := range app.Status.SourceTypes {
if st == v1alpha1.ApplicationSourceTypeHelm {
return v1alpha1.ApplicationSourceTypeHelm
} else if s.Kustomize != nil {
} else if st == v1alpha1.ApplicationSourceTypeKustomize {
return v1alpha1.ApplicationSourceTypeKustomize
} else if s.Plugin != nil {
} else if st == v1alpha1.ApplicationSourceTypePlugin {
return v1alpha1.ApplicationSourceTypePlugin
}
}
Expand Down

0 comments on commit 2bf4b0a

Please sign in to comment.