Skip to content

Commit

Permalink
Code fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
mshaposhnik committed Apr 26, 2021
1 parent 188fe32 commit 4b3e489
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pkg/deploy/identity-provider/identity_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ var (
syncOpenShiftIdentityProvider,
SyncGitHubOAuth,
}
keycloakClientURLsUpdated = false
)

// SyncIdentityProviderToCluster instantiates the identity provider (Keycloak) in the cluster. Returns true if
Expand Down Expand Up @@ -121,12 +122,17 @@ func syncKeycloakResources(deployContext *deploy.DeployContext) (bool, error) {
break
}
}
_, err := util.K8sclient.ExecIntoPod(
deployContext.CheCluster,
deploy.IdentityProviderName,
GetKeycloakUpdateCommand,
"Update redirect URI-s")
return err == nil, err
if !keycloakClientURLsUpdated {
if _, err := util.K8sclient.ExecIntoPod(
deployContext.CheCluster,
deploy.IdentityProviderName,
GetKeycloakUpdateCommand,
"Update redirect URI-s"); err != nil {
return false, err
} else {
keycloakClientURLsUpdated = true
}
}
}

return true, nil
Expand Down

0 comments on commit 4b3e489

Please sign in to comment.