try to set infra roles also if one fails (#3045)

This commit is contained in:
Felix Kunde 2026-02-18 08:38:17 +01:00 committed by GitHub
parent 6ce7c50cec
commit cffa0ee63c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -347,9 +347,11 @@ func (c *Controller) initController() {
logMultiLineConfig(c.logger, c.opConfig.MustMarshal())
roleDefs := c.getInfrastructureRoleDefinitions()
if infraRoles, err := c.getInfrastructureRoles(roleDefs); err != nil {
c.logger.Warningf("could not get infrastructure roles: %v", err)
} else {
infraRoles, err := c.getInfrastructureRoles(roleDefs)
if err != nil {
c.logger.Warningf("could not get all infrastructure roles: %v", err)
}
if len(infraRoles) > 0 {
c.config.InfrastructureRoles = infraRoles
}