From 16fa41d25bd3e00692693a8544e3ea842d894a69 Mon Sep 17 00:00:00 2001 From: Alexander Matyushentsev Date: Thu, 14 Jun 2018 09:08:22 -0700 Subject: [PATCH] Issue #275 - Application controller fails to get app state if app has resource without name (#285) --- controller/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/state.go b/controller/state.go index 929cb364b9..e23954116c 100644 --- a/controller/state.go +++ b/controller/state.go @@ -145,7 +145,7 @@ func (ks *KsonnetAppStateManager) CompareAppState(app *v1alpha1.Application) (*v for i, targetObj := range targetObjs { fullName := getResourceFullName(targetObj) liveObj := liveObjByFullName[fullName] - if liveObj == nil { + if liveObj == nil && targetObj.GetName() != "" { // If we get here, it indicates we did not find the live resource when querying using // our app label. However, it is possible that the resource was created/modified outside // of ArgoCD. In order to determine that it is truly missing, we fall back to perform a