1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Set correct namespace for the subject when creating new role binding (#3083)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2021-06-17 15:43:59 +03:00 committed by GitHub
parent 2ab92ec488
commit 239a8b5b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,17 +91,15 @@ export class RoleBindingDialog extends React.Component<Props> {
const serviceAccounts = Array.from(this.selectedAccounts, sa => ({ const serviceAccounts = Array.from(this.selectedAccounts, sa => ({
name: sa.getName(), name: sa.getName(),
kind: "ServiceAccount" as const, kind: "ServiceAccount" as const,
namespace: this.bindingNamespace, namespace: sa.getNs(),
})); }));
const users = Array.from(this.selectedUsers, user => ({ const users = Array.from(this.selectedUsers, user => ({
name: user, name: user,
kind: "User" as const, kind: "User" as const
namespace: this.bindingNamespace,
})); }));
const groups = Array.from(this.selectedGroups, group => ({ const groups = Array.from(this.selectedGroups, group => ({
name: group, name: group,
kind: "Group" as const, kind: "Group" as const
namespace: this.bindingNamespace,
})); }));
return [ return [