File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed
Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -296,39 +296,17 @@ func ManagedByAddonManager(obj interface{}) bool {
296296 accessor , _ := meta .Accessor (obj )
297297 annotations := accessor .GetAnnotations ()
298298 if len (annotations ) == 0 {
299- return false
299+ return true
300300 }
301301
302302 value , ok := annotations [addonapiv1alpha1 .AddonLifecycleAnnotationKey ]
303303 if ! ok {
304- return false
304+ return true
305305 }
306306
307307 return value == addonapiv1alpha1 .AddonLifecycleAddonManagerAnnotationValue
308308}
309309
310- func ManagedBySelf (agentAddons map [string ]agent.AgentAddon ) func (obj interface {}) bool {
311- return func (obj interface {}) bool {
312- accessor , _ := meta .Accessor (obj )
313- if _ , ok := agentAddons [accessor .GetName ()]; ! ok {
314- return false
315- }
316-
317- annotations := accessor .GetAnnotations ()
318-
319- if len (annotations ) == 0 {
320- return true
321- }
322-
323- value , ok := annotations [addonapiv1alpha1 .AddonLifecycleAnnotationKey ]
324- if ! ok {
325- return true
326- }
327-
328- return value == addonapiv1alpha1 .AddonLifecycleSelfManageAnnotationValue
329- }
330- }
331-
332310func FilterByAddonName (agentAddons map [string ]agent.AgentAddon ) func (obj interface {}) bool {
333311 return func (obj interface {}) bool {
334312 accessor , _ := meta .Accessor (obj )
You can’t perform that action at this time.
0 commit comments