-
Notifications
You must be signed in to change notification settings - Fork 0
/
controller.go
56 lines (51 loc) · 2.59 KB
/
controller.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package management
import (
"context"
"github.com/rancher/rancher/pkg/clustermanager"
"github.com/rancher/rancher/pkg/controllers/management/auth"
"github.com/rancher/rancher/pkg/controllers/management/catalog"
"github.com/rancher/rancher/pkg/controllers/management/cloudcredential"
"github.com/rancher/rancher/pkg/controllers/management/cluster"
"github.com/rancher/rancher/pkg/controllers/management/clusterdeploy"
"github.com/rancher/rancher/pkg/controllers/management/clustergc"
"github.com/rancher/rancher/pkg/controllers/management/clusterprovisioner"
"github.com/rancher/rancher/pkg/controllers/management/clusterstats"
"github.com/rancher/rancher/pkg/controllers/management/clusterstatus"
"github.com/rancher/rancher/pkg/controllers/management/compose"
"github.com/rancher/rancher/pkg/controllers/management/drivers/kontainerdriver"
"github.com/rancher/rancher/pkg/controllers/management/drivers/nodedriver"
"github.com/rancher/rancher/pkg/controllers/management/etcdbackup"
"github.com/rancher/rancher/pkg/controllers/management/globaldns"
"github.com/rancher/rancher/pkg/controllers/management/multiclusterapp"
"github.com/rancher/rancher/pkg/controllers/management/node"
"github.com/rancher/rancher/pkg/controllers/management/nodepool"
"github.com/rancher/rancher/pkg/controllers/management/podsecuritypolicy"
"github.com/rancher/rancher/pkg/controllers/management/usercontrollers"
"github.com/rancher/types/config"
)
func Register(ctx context.Context, management *config.ManagementContext, manager *clustermanager.Manager) {
// auth handlers need to run early to create namespaces that back clusters and projects
// also, these handlers are purely in the mgmt plane, so they are lightweight compared to those that interact with machines and clusters
auth.RegisterEarly(ctx, management)
usercontrollers.RegisterEarly(ctx, management, manager)
// a-z
catalog.Register(ctx, management)
cluster.Register(ctx, management)
clusterdeploy.Register(ctx, management, manager)
clustergc.Register(ctx, management)
clusterprovisioner.Register(ctx, management)
clusterstats.Register(ctx, management, manager)
clusterstatus.Register(ctx, management)
compose.Register(ctx, management, manager)
kontainerdriver.Register(ctx, management)
nodedriver.Register(ctx, management)
nodepool.Register(ctx, management)
cloudcredential.Register(ctx, management)
node.Register(ctx, management)
podsecuritypolicy.Register(ctx, management)
etcdbackup.Register(ctx, management)
globaldns.Register(ctx, management)
multiclusterapp.Register(ctx, management, manager)
// Register last
auth.RegisterLate(ctx, management)
}