Skip to content

Commit 0ed6422

Browse files
committed
fix(cluster): 解决集群删除时,未完全清除 rbac 资源的问题
1 parent b1ba011 commit 0ed6422

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/api/v1/cluster/cluster_role.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ func (h *Handler) CreateClusterRole() iris.Handler {
130130
req.Annotations["builtin"] = "false"
131131
req.Annotations["created-at"] = time.Now().Format("2006-01-02 15:04:05")
132132
req.Labels[kubernetes.LabelManageKey] = "kubepi"
133+
req.Labels[kubernetes.LabelClusterId] = c.Metadata.UUID
133134
resp, err := client.RbacV1().ClusterRoles().Create(goContext.TODO(), &req, metav1.CreateOptions{})
134135
if err != nil {
135136
ctx.StatusCode(iris.StatusInternalServerError)

0 commit comments

Comments
 (0)