add cluster controller (#1993)

This commit is contained in:
zryfish
2020-04-08 00:40:28 +08:00
committed by GitHub
parent cfaeb10dc6
commit e174dcb3d6

View File

@@ -20,6 +20,7 @@ package app
import (
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/controller/application"
"kubesphere.io/kubesphere/pkg/controller/cluster"
"kubesphere.io/kubesphere/pkg/controller/destinationrule"
"kubesphere.io/kubesphere/pkg/controller/job"
"kubesphere.io/kubesphere/pkg/controller/s2ibinary"
@@ -93,6 +94,13 @@ func AddControllers(
client.KubeSphere(),
kubesphereInformer.Iam().V1alpha2().Users())
clusterController := cluster.NewClusterController(
client.Kubernetes(),
kubesphereInformer.Cluster().V1alpha1().Clusters(),
kubesphereInformer.Cluster().V1alpha1().Agents(),
client.KubeSphere().ClusterV1alpha1().Agents(),
client.KubeSphere().ClusterV1alpha1().Clusters())
controllers := map[string]manager.Runnable{
"virtualservice-controller": vsController,
"destinationrule-controller": drController,
@@ -102,6 +110,7 @@ func AddControllers(
"s2irun-controller": s2iRunController,
"volumeexpansion-controller": volumeExpansionController,
"user-controller": userController,
"cluster-controller": clusterController,
}
for name, ctrl := range controllers {