fix redundant appending of infrastructure roles

This commit is contained in:
Felix Kunde 2020-11-04 15:49:38 +01:00
parent db0d089e75
commit f41111f1c3
1 changed files with 1 additions and 3 deletions

View File

@ -341,9 +341,7 @@ func (c *Controller) getInfrastructureRole(
util.Coalesce(string(secretData[infraRole.RoleKey]), infraRole.DefaultRoleValue)) util.Coalesce(string(secretData[infraRole.RoleKey]), infraRole.DefaultRoleValue))
} }
if roleDescr.Valid() { if !roleDescr.Valid() {
roles = append(roles, *roleDescr)
} else {
msg := "infrastructure role %q is not complete and ignored" msg := "infrastructure role %q is not complete and ignored"
c.logger.Warningf(msg, roleDescr) c.logger.Warningf(msg, roleDescr)