Skip to content

Commit cffa0ee

Browse files
authored
try to set infra roles also if one fails (zalando#3045)
1 parent 6ce7c50 commit cffa0ee

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pkg/controller/controller.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,11 @@ func (c *Controller) initController() {
347347
logMultiLineConfig(c.logger, c.opConfig.MustMarshal())
348348

349349
roleDefs := c.getInfrastructureRoleDefinitions()
350-
if infraRoles, err := c.getInfrastructureRoles(roleDefs); err != nil {
351-
c.logger.Warningf("could not get infrastructure roles: %v", err)
352-
} else {
350+
infraRoles, err := c.getInfrastructureRoles(roleDefs)
351+
if err != nil {
352+
c.logger.Warningf("could not get all infrastructure roles: %v", err)
353+
}
354+
if len(infraRoles) > 0 {
353355
c.config.InfrastructureRoles = infraRoles
354356
}
355357

0 commit comments

Comments
 (0)