Skip to content

Commit

Permalink
build(operator): update clusterrole of controller and webhook (#842)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Update clusterrole of controller and webhook's yaml file.

### Why are the changes needed?
If not modified, the new versions of rss-controller and rss-webhook will report permission errors

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually verified.
  • Loading branch information
wangao1236 committed Apr 26, 2023
1 parent c58110f commit 47c4966
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions deploy/kubernetes/operator/config/manager/rss-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ rules:
- apiGroups: [ "" ]
resources: [ "events" ]
verbs: [ "list", "watch", "create", "update", "patch" ]
- apiGroups: [ "autoscaling" ]
resources: [ "horizontalpodautoscalers" ]
verbs: [ "get", "list", "watch", "update", "create", "delete", "patch" ]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
15 changes: 12 additions & 3 deletions deploy/kubernetes/operator/config/manager/rss-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ rules:
- apiGroups: [ "" ]
resources: [ "pods" ]
verbs: [ "get", "list", "watch", "delete" ]
- apiGroups: [ "node.k8s.io" ]
resources: [ "runtimeclasses" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "uniffle.apache.org" ]
resources: [ "remoteshuffleservices", "remoteshuffleservices/status" ]
verbs: [ "get", "list", "watch", "update" ]
Expand All @@ -45,9 +48,15 @@ rules:
- apiGroups: [ "" ]
resources: [ "events" ]
verbs: [ "list", "watch", "create", "update", "patch" ]
- apiGroups: [ "node.k8s.io"]
- apiGroups: [ "node.k8s.io" ]
resources: [ "runtimeclasses" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "autoscaling" ]
resources: [ "horizontalpodautoscalers" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "apps" ]
resources: [ "statefulsets" ]
verbs: [ "get", "list", "watch" ]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -105,8 +114,8 @@ spec:
command:
- "./webhook"
args:
- "--ignore-rss=false"
- "--v=4"
- "--ignore-rss=false"
- "--v=4"
ports:
- containerPort: 9876
protocol: TCP
Expand Down

0 comments on commit 47c4966

Please sign in to comment.