37 Star 411 Fork 76

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
controllers.go 3.26 KB
一键复制 编辑 原始数据 按行查看 历史
Darren Shepherd 提交于 2018-09-17 15:49 . Shard user controllers
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/approuter"
"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/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/resourcequota"
"github.com/rancher/rancher/pkg/controllers/user/secret"
"github.com/rancher/rancher/pkg/controllers/user/systemimage"
"github.com/rancher/rancher/pkg/controllers/user/targetworkloadservice"
"github.com/rancher/rancher/pkg/controllers/user/workload"
"github.com/rancher/types/config"
// init upgrade implement
_ "github.com/rancher/rancher/pkg/controllers/user/alert/upgrade"
_ "github.com/rancher/rancher/pkg/controllers/user/logging/upgrade"
_ "github.com/rancher/rancher/pkg/controllers/user/pipeline/upgrade"
)
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(ctx, cluster)
networkpolicy.Register(cluster)
noderemove.Register(cluster)
nodesyncer.Register(ctx, cluster, kubeConfigGetter)
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)
systemimage.Register(ctx, cluster)
endpoints.Register(ctx, cluster)
approuter.Register(ctx, cluster)
resourcequota.Register(ctx, cluster)
userOnlyContext := cluster.UserOnlyContext()
dnsrecord.Register(ctx, userOnlyContext)
externalservice.Register(ctx, userOnlyContext)
ingress.Register(ctx, userOnlyContext, cluster)
ingresshostgen.Register(userOnlyContext)
targetworkloadservice.Register(ctx, userOnlyContext)
workload.Register(ctx, userOnlyContext)
return nil
}
func RegisterFollower(ctx context.Context, cluster *config.UserContext, kubeConfigGetter common.KubeConfigGetter, clusterManager healthsyncer.ClusterControllerLifecycle) error {
cluster.Core.Namespaces("").Controller()
cluster.RBAC.ClusterRoleBindings("").Controller()
cluster.RBAC.RoleBindings("").Controller()
return nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.1.14-rc2

搜索帮助

0d507c66 1850385 C8b1a773 1850385