37 Star 407 Fork 74

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
register.go 766 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aiwantaozi 提交于 2018-08-27 19:40 . support upgrade system service
package systemimage
import (
"context"
"github.com/rancher/types/config"
)
func Register(ctx context.Context, cluster *config.UserContext) {
for _, v := range systemServices {
v.Init(ctx, cluster)
}
projClient := cluster.Management.Management.Projects("")
syncer := Syncer{
clusterName: cluster.ClusterName,
projects: projClient,
projectLister: projClient.Controller().Lister(),
daemonsets: cluster.Apps.DaemonSets(""),
daemonsetLister: cluster.Apps.DaemonSets("").Controller().Lister(),
deployments: cluster.Apps.Deployments(""),
deploymentLister: cluster.Apps.Deployments("").Controller().Lister(),
}
projClient.AddClusterScopedHandler("system-image-upgrade-controller", cluster.ClusterName, syncer.Sync)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rancher/rancher.git
git@gitee.com:rancher/rancher.git
rancher
rancher
rancher
v2.1.2-rc6

搜索帮助