Skip to content

Commit 2bf4b0a

Browse files
Use status instead of spec for determining source types (argoproj-labs#772)
Signed-off-by: Jason Parraga <[email protected]> Co-authored-by: Cheng Fang <[email protected]>
1 parent e4270b8 commit 2bf4b0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/argocd/argocd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,12 @@ func getApplicationSourceType(app *v1alpha1.Application) v1alpha1.ApplicationSou
572572
}
573573

574574
if app.Spec.HasMultipleSources() {
575-
for _, s := range app.Spec.Sources {
576-
if s.Helm != nil {
575+
for _, st := range app.Status.SourceTypes {
576+
if st == v1alpha1.ApplicationSourceTypeHelm {
577577
return v1alpha1.ApplicationSourceTypeHelm
578-
} else if s.Kustomize != nil {
578+
} else if st == v1alpha1.ApplicationSourceTypeKustomize {
579579
return v1alpha1.ApplicationSourceTypeKustomize
580-
} else if s.Plugin != nil {
580+
} else if st == v1alpha1.ApplicationSourceTypePlugin {
581581
return v1alpha1.ApplicationSourceTypePlugin
582582
}
583583
}

0 commit comments

Comments
 (0)