Skip to content

Commit

Permalink
Merge pull request #29 from almaslennikov/fix-role-add-ds
Browse files Browse the repository at this point in the history
Add operations on daemonsets to cluster role
  • Loading branch information
adrianchiris authored Sep 16, 2024
2 parents 810ab7b + 25f6907 commit c1fa7fa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ rules:
- list
- patch
- update
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- list
- watch
- apiGroups:
- maintenance.nvidia.com
resources:
Expand Down
9 changes: 9 additions & 0 deletions deployment/maintenance-operator-chart/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ rules:
- get
- patch
- update
- apiGroups:
- apps
resources:
- daemonsets
verbs:
- get
- list
- watch

---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
Expand Down
1 change: 1 addition & 0 deletions internal/controller/nodemaintenance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ type NodeMaintenanceReconciler struct {
//+kubebuilder:rbac:groups="",resources=nodes,verbs=get;update;patch
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;watch;list;update;patch;delete
//+kubebuilder:rbac:groups="",resources=pods/eviction,verbs=create;get;list;update;patch;delete
//+kubebuilder:rbac:groups="apps",resources=daemonsets,verbs=get;watch;list

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down

0 comments on commit c1fa7fa

Please sign in to comment.