From c905fe69d4889ba16143aadf493992a9b7d8fd9b Mon Sep 17 00:00:00 2001 From: jeffail Date: Tue, 24 Apr 2018 13:54:26 +0100 Subject: [PATCH] Fix condition cash issue --- lib/manager/type.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/manager/type.go b/lib/manager/type.go index 242a237173..db9cf034f6 100644 --- a/lib/manager/type.go +++ b/lib/manager/type.go @@ -98,21 +98,14 @@ func New( // Sometimes condition resources might refer to other condition resources. // When they are constructed they will check will the manager to ensure the // resource they point to is valid, but not use the condition. Since we - // cannot guarantee an order of initialisation we simple create placeholder - // conditions during construction. However, we make sure we don't add the - // constructing condition itself in order to avoid recursive conditions. + // cannot guarantee an order of initialisation we create placeholder + // conditions during construction. for k := range conf.Conditions { t.conditions[k] = nil } // TODO: Prevent recursive conditions. for k, newConf := range conf.Conditions { - for k2 := range conf.Conditions { - if k != k2 { - t.conditions[k2] = nil - } - } - newCond, err := condition.New(newConf, t, log, stats) if err != nil { return nil, fmt.Errorf(