From b379db20edc05fa946c6cc50ec13161b80a89c5d Mon Sep 17 00:00:00 2001 From: Felix Kunde Date: Thu, 5 Nov 2020 12:04:51 +0100 Subject: [PATCH] fix redundant appending of infrastructure roles (#1192) --- pkg/controller/util.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/controller/util.go b/pkg/controller/util.go index 2adc0bea1..7f87de97d 100644 --- a/pkg/controller/util.go +++ b/pkg/controller/util.go @@ -341,9 +341,7 @@ func (c *Controller) getInfrastructureRole( util.Coalesce(string(secretData[infraRole.RoleKey]), infraRole.DefaultRoleValue)) } - if roleDescr.Valid() { - roles = append(roles, *roleDescr) - } else { + if !roleDescr.Valid() { msg := "infrastructure role %q is not complete and ignored" c.logger.Warningf(msg, roleDescr)