Sets app status to unknown if there is an error. Closes #2577 (#2578)

This commit is contained in:
Alex Collins 2019-10-29 11:44:34 -07:00 committed by GitHub
parent 9d784e7e3f
commit a9a28b7e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -437,6 +437,10 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, revision st
} else {
resState.Status = v1alpha1.SyncStatusCodeSynced
}
// we can't say anything about the status if we were unable to get the target objects
if failedToLoadObjs {
resState.Status = v1alpha1.SyncStatusCodeUnknown
}
managedResources[i] = managedResource{
Name: resState.Name,
Namespace: resState.Namespace,