-
Notifications
You must be signed in to change notification settings - Fork 0
/
controllers.go
61 lines (56 loc) · 2.62 KB
/
controllers.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
57
58
59
60
61
package user
import (
"context"
"github.com/rancher/rancher/pkg/controllers/management/compose/common"
"github.com/rancher/rancher/pkg/controllers/user/alert"
"github.com/rancher/rancher/pkg/controllers/user/dnsrecord"
"github.com/rancher/rancher/pkg/controllers/user/endpoints"
"github.com/rancher/rancher/pkg/controllers/user/externalservice"
"github.com/rancher/rancher/pkg/controllers/user/healthsyncer"
"github.com/rancher/rancher/pkg/controllers/user/helm"
"github.com/rancher/rancher/pkg/controllers/user/ingress"
"github.com/rancher/rancher/pkg/controllers/user/ingresshostgen"
"github.com/rancher/rancher/pkg/controllers/user/logging"
"github.com/rancher/rancher/pkg/controllers/user/namespacecompose"
"github.com/rancher/rancher/pkg/controllers/user/networkpolicy"
"github.com/rancher/rancher/pkg/controllers/user/noderemove"
"github.com/rancher/rancher/pkg/controllers/user/nodesyncer"
"github.com/rancher/rancher/pkg/controllers/user/nslabels"
"github.com/rancher/rancher/pkg/controllers/user/pipeline"
"github.com/rancher/rancher/pkg/controllers/user/rbac"
"github.com/rancher/rancher/pkg/controllers/user/rbac/podsecuritypolicy"
"github.com/rancher/rancher/pkg/controllers/user/secret"
"github.com/rancher/rancher/pkg/controllers/user/targetworkloadservice"
"github.com/rancher/rancher/pkg/controllers/user/usercompose"
"github.com/rancher/rancher/pkg/controllers/user/workload"
"github.com/rancher/types/config"
)
func Register(ctx context.Context, cluster *config.UserContext, kubeConfigGetter common.KubeConfigGetter, clusterManager healthsyncer.ClusterControllerLifecycle) error {
alert.Register(ctx, cluster)
rbac.Register(cluster)
healthsyncer.Register(ctx, cluster, clusterManager)
helm.Register(cluster, kubeConfigGetter)
logging.Register(cluster)
networkpolicy.Register(cluster)
noderemove.Register(cluster)
nodesyncer.Register(cluster)
nslabels.Register(cluster)
pipeline.Register(ctx, cluster)
podsecuritypolicy.RegisterCluster(cluster)
podsecuritypolicy.RegisterBindings(cluster)
podsecuritypolicy.RegisterNamespace(cluster)
podsecuritypolicy.RegisterServiceAccount(cluster)
podsecuritypolicy.RegisterTemplate(cluster)
secret.Register(cluster)
endpoints.Register(ctx, cluster)
usercompose.Register(cluster, kubeConfigGetter)
namespacecompose.Register(cluster, kubeConfigGetter)
userOnlyContext := cluster.UserOnlyContext()
dnsrecord.Register(ctx, userOnlyContext)
externalservice.Register(ctx, userOnlyContext)
ingress.Register(ctx, userOnlyContext)
ingresshostgen.Register(userOnlyContext)
targetworkloadservice.Register(ctx, userOnlyContext)
workload.Register(ctx, userOnlyContext)
return nil
}