You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/12/29 09:19:36 UTC

[GitHub] [yunikorn-k8shim] zhuqi-lucas commented on a diff in pull request #508: [YUNIKORN-1499] Use fine-grained K8s access control in example deployments.

zhuqi-lucas commented on code in PR #508:
URL: https://github.com/apache/yunikorn-k8shim/pull/508#discussion_r1058835170


##########
deployments/scheduler/yunikorn-rbac.yaml:
##########
@@ -26,7 +66,49 @@ metadata:
 subjects:
   - kind: ServiceAccount
     name: yunikorn-admin
+    namespace: yunikorn
+roleRef:
+  kind: ClusterRole
+  name: yunikorn-scheduler
+  apiGroup: rbac.authorization.k8s.io
+
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: yunikorn-rbac-kube-scheduler
+subjects:
+  - kind: ServiceAccount
+    name: yunikorn-admin
+    namespace: yunikorn
+roleRef:
+  kind: ClusterRole
+  name: system:kube-scheduler
+  apiGroup: rbac.authorization.k8s.io
+
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: yunikorn-rbac-volume-scheduler
+subjects:
+  - kind: ServiceAccount
+    name: yunikorn-admin
+    namespace: yunikorn
 roleRef:
   kind: ClusterRole
-  name: cluster-admin
+  name: system:volume-scheduler
   apiGroup: rbac.authorization.k8s.io
+
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+  name: yunikorn-rbac
+subjects:
+  - kind: ServiceAccount
+    name: yunikorn-admin
+roleRef:
+  kind: Role
+  name: yunikorn-scheduler
+  apiGroup: rbac.authorization.k8s.io

Review Comment:
   Sure, add a newline now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org