Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 341fabb

Browse files
committed
cli: grant access to status subresources
1 parent feb9da7 commit 341fabb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/lib/rbac.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,18 @@ function updateManagerRole(filename, data) {
2121
// @ts-ignore
2222
role.rules ??= [];
2323
const plural = pluralize(data.kind.toLowerCase());
24+
const status = `${plural}/status`;
2425
// @ts-ignore
2526
const rule = role.rules.find((r) => {
2627
return isDeepStrictEqual(r?.apiGroups, [data.group]) &&
27-
isDeepStrictEqual(r?.resources, [plural]);
28+
isDeepStrictEqual(r?.resources, [plural, status]);
2829
});
2930

3031
if (rule === undefined) {
3132
// @ts-ignore
3233
role.rules.push({
3334
apiGroups: [data.group],
34-
resources: [plural],
35+
resources: [plural, status],
3536
verbs: ['create', 'delete', 'get', 'list', 'patch', 'update', 'watch']
3637
});
3738
}

0 commit comments

Comments
 (0)