fix redundant appending of infrastructure roles (#1192)

This commit is contained in:
Felix Kunde 2020-11-05 12:04:51 +01:00 committed by GitHub
parent 9a824c38f4
commit b379db20ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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))
}
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)