代码拉取完成,页面将自动刷新
package auth
import (
"context"
"github.com/rancher/types/config"
)
func RegisterEarly(ctx context.Context, management *config.ManagementContext) {
prtb, crtb := newRTBLifecycles(management)
gr := newGlobalRoleLifecycle(management)
grb := newGlobalRoleBindingLifecycle(management)
p, c := newPandCLifecycles(management)
u := newUserLifecycle(management)
n := newTokenController(management)
ua := newUserAttributeController(management)
s := newAuthSettingController(management)
management.Management.ProjectRoleTemplateBindings("").AddLifecycle(ctx, ptrbMGMTController, prtb)
management.Management.ClusterRoleTemplateBindings("").AddLifecycle(ctx, ctrbMGMTController, crtb)
management.Management.GlobalRoles("").AddLifecycle(ctx, grController, gr)
management.Management.GlobalRoleBindings("").AddLifecycle(ctx, grbController, grb)
management.Management.Projects("").AddHandler(ctx, projectCreateController, p.sync)
management.Management.Clusters("").AddHandler(ctx, clusterCreateController, c.sync)
management.Management.Users("").AddLifecycle(ctx, userController, u)
management.Management.Tokens("").AddHandler(ctx, tokenController, n.sync)
management.Management.UserAttributes("").AddHandler(ctx, userAttributeController, ua.sync)
management.Management.Settings("").AddHandler(ctx, authSettingController, s.sync)
}
func RegisterLate(ctx context.Context, management *config.ManagementContext) {
p, c := newPandCLifecycles(management)
management.Management.Projects("").AddLifecycle(ctx, projectRemoveController, p)
management.Management.Clusters("").AddLifecycle(ctx, clusterRemoveController, c)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。