Skip to content

Commit 3abe267

Browse files
ibm-ci-bothoris233
andauthored
sync up role name (#66)
Co-authored-by: Jiaming Hu <[email protected]>
1 parent 8ab6f9a commit 3abe267

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)