Skip to content

Commit c008bab

Browse files
authored
sync up role name (#65)
1 parent 70f43db commit c008bab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/namespacescope_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ func (r *NamespaceScopeReconciler) DeleteRole(labels map[string]string, toNs str
557557

558558
func (r *NamespaceScopeReconciler) CreateRoleBinding(roleNames []string, labels map[string]string, saName, fromNs, toNs string) error {
559559
for _, roleName := range roleNames {
560-
hashedServiceAccount := sha256.Sum256([]byte(saName + fromNs))
560+
hashedServiceAccount := sha256.Sum256([]byte(roleName + saName + fromNs))
561561
name := strings.Split(roleName, ".")[0] + "-" + hex.EncodeToString(hashedServiceAccount[:7])
562562
namespace := toNs
563563
subjects := []rbacv1.Subject{}

0 commit comments

Comments
 (0)