...
1
16
17 package app
18
19 import (
20 "context"
21
22 "k8s.io/controller-manager/controller"
23 "k8s.io/kubernetes/cmd/kube-controller-manager/names"
24 "k8s.io/kubernetes/pkg/controller/clusterroleaggregation"
25 )
26
27 func newClusterRoleAggregrationControllerDescriptor() *ControllerDescriptor {
28 return &ControllerDescriptor{
29 name: names.ClusterRoleAggregationController,
30 aliases: []string{"clusterrole-aggregation"},
31 initFunc: startClusterRoleAggregationController,
32 }
33 }
34
35 func startClusterRoleAggregationController(ctx context.Context, controllerContext ControllerContext, controllerName string) (controller.Interface, bool, error) {
36 go clusterroleaggregation.NewClusterRoleAggregation(
37 controllerContext.InformerFactory.Rbac().V1().ClusterRoles(),
38 controllerContext.ClientBuilder.ClientOrDie("clusterrole-aggregation-controller").RbacV1(),
39 ).Run(ctx, 5)
40 return nil, true, nil
41 }
42
View as plain text