Skip to content

Commit b379db2

Browse files
authored
fix redundant appending of infrastructure roles (zalando#1192)
1 parent 9a824c3 commit b379db2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/controller/util.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,7 @@ func (c *Controller) getInfrastructureRole(
341341
util.Coalesce(string(secretData[infraRole.RoleKey]), infraRole.DefaultRoleValue))
342342
}
343343

344-
if roleDescr.Valid() {
345-
roles = append(roles, *roleDescr)
346-
} else {
344+
if !roleDescr.Valid() {
347345
msg := "infrastructure role %q is not complete and ignored"
348346
c.logger.Warningf(msg, roleDescr)
349347

0 commit comments

Comments
 (0)