Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixed-20260811-233307.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixed
body: tighten configmap verb for admission, nodescaleadjuster, podgroupcontroller, podgrouper, queuecontroller, scheduler ClusterRole
time: 2026-08-11T23:33:07.93807465+01:00
custom:
Author: dttung2905
Issue: "2060"
1 change: 0 additions & 1 deletion cmd/admission/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ func (app *App) RegisterPlugins(admissionPlugins *admissionplugins.KaiAdmissionP
app.admissionPlugins = admissionPlugins
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch;update

Expand Down
1 change: 0 additions & 1 deletion cmd/nodescaleadjuster/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func init() {
// +kubebuilder:scaffold:scheme
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=events,verbs=create;patch;update

Expand Down
1 change: 0 additions & 1 deletion cmd/podgroupcontroller/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func init() {
// +kubebuilder:scaffold:scheme
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete

func Run(options *Options, config *rest.Config, ctx context.Context) error {
Expand Down
1 change: 0 additions & 1 deletion cmd/podgrouper/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func (app *App) RegisterPlugins(pluginsHub pluginshub.PluginsHub) {
app.pluginsHub = pluginsHub
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete

func (app *App) Run() error {
Expand Down
1 change: 0 additions & 1 deletion cmd/queuecontroller/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func init() {
// +kubebuilder:scaffold:scheme
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete

func Run(opts *Options, clientConfig *rest.Config, ctx context.Context) error {
Expand Down
1 change: 0 additions & 1 deletion cmd/scheduler/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ func setConfig(so *options.ServerOption) {
config.MIGWorkerNodeLabelKey = so.MIGWorkerNodeLabelKey
}

// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete

func Run(ctx context.Context, opt *options.ServerOption, config *restclient.Config, mux *http.ServeMux) error {
Expand Down
12 changes: 0 additions & 12 deletions deployments/kai-scheduler/templates/rbac/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ kind: ClusterRole
metadata:
name: kai-admission
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
15 changes: 7 additions & 8 deletions deployments/kai-scheduler/templates/rbac/nodescaleadjuster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@ rules:
- apiGroups:
- ""
resources:
- configmaps
- pods
- events
- pods/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- events
- pods/finalizers
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
12 changes: 0 additions & 12 deletions deployments/kai-scheduler/templates/rbac/podgroupcontroller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ kind: ClusterRole
metadata:
name: kai-podgroup-controller
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
13 changes: 1 addition & 12 deletions deployments/kai-scheduler/templates/rbac/podgrouper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ rules:
- ""
resources:
- configmaps
- namespaces
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
Expand All @@ -34,14 +31,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
12 changes: 0 additions & 12 deletions deployments/kai-scheduler/templates/rbac/queuecontroller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ kind: ClusterRole
metadata:
name: queuecontroller
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
Expand Down
20 changes: 10 additions & 10 deletions deployments/kai-scheduler/templates/rbac/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ rules:
- ""
resources:
- configmaps
- events
- pods/status
- namespaces
- nodes
- persistentvolumeclaims
- persistentvolumes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
- nodes
- persistentvolumeclaims
- persistentvolumes
- events
- pods/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
Expand Down
Loading