37 Star 395 Fork 72

GVPrancher/rancher

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
register.go 771 Bytes
一键复制 编辑 原始数据 按行查看 历史
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(ctx, "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.2.0-alpha2

搜索帮助

Cb406eda 1850385 E526c682 1850385