Skip to content

Commit

Permalink
fix: wait sync rules before start auth controller
Browse files Browse the repository at this point in the history
  • Loading branch information
yadzhang committed Apr 29, 2020
1 parent 235afe9 commit a0f537f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/tke-auth-controller/app/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import (

const (
policySyncPeriod = 5 * time.Minute
concurrentPolicySyncs = 5
concurrentPolicySyncs = 10

projectPolicySyncPeriod = 5 * time.Minute
concurrentProjectPolicySyncs = 5
concurrentProjectPolicySyncs = 10

localIdentitySyncPeriod = 5 * time.Minute
concurrentLocalIdentitySyncs = 5
Expand Down
1 change: 0 additions & 1 deletion cmd/tke-auth-controller/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func CreateControllerContext(cfg *config.Config, rootClientBuilder controller.Cl

rm := domainrolemanager.NewRoleManager(10)
enforcer.SetRoleManager(rm)
_ = enforcer.LoadPolicy()
enforcer.StartAutoLoadPolicy(cfg.CasbinReloadInterval)

ctx := ControllerContext{
Expand Down

0 comments on commit a0f537f

Please sign in to comment.