Skip to content

Commit 94913ea

Browse files
authored
koord-manager: update RBAC (#779)
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
1 parent 2d5506c commit 94913ea

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

config/rbac/role.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,22 @@ rules:
4141
- get
4242
- list
4343
- watch
44+
- apiGroups:
45+
- ""
46+
resources:
47+
- namespaces
48+
verbs:
49+
- get
50+
- list
51+
- watch
4452
- apiGroups:
4553
- ""
4654
resources:
4755
- nodes
4856
verbs:
4957
- get
5058
- list
59+
- patch
5160
- watch
5261
- apiGroups:
5362
- ""

pkg/slo-controller/noderesource/noderesource_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type NodeResourceReconciler struct {
5252
}
5353

5454
// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch
55-
// +kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch
55+
// +kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch;patch
5656
// +kubebuilder:rbac:groups=core,resources=nodes/status,verbs=get;update;patch
5757
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch
5858
// +kubebuilder:rbac:groups=scheduling.koordinator.sh,resources=devices,verbs=get;list;watch

pkg/webhook/pod/mutating/cluster_colocation_profile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import (
3939
utilclient "github.com/koordinator-sh/koordinator/pkg/util/client"
4040
)
4141

42+
// +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch
4243
// +kubebuilder:rbac:groups=config.koordinator.sh,resources=clustercolocationprofiles,verbs=get;list;watch
4344

4445
func (h *PodMutatingHandler) clusterColocationProfileMutatingPod(ctx context.Context, req admission.Request, pod *corev1.Pod) error {

0 commit comments

Comments
 (0)