Skip to content

Commit 632c1d1

Browse files
authored
Add a WLM ClusterRole that can also access some NNF resources (#180)
When access to NNF resources is desired, then the WLM would use this ClusterRole rather than the one provided by DWS. Signed-off-by: Dean Roehrich <dean.roehrich@hpe.com>
1 parent e89996d commit 632c1d1

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

docs/guides/rbac-for-users/readme.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,11 @@ DataWorkflowServices has already defined the role to be used with WLMs, named `d
133133
kubectl get clusterrole dws-workload-manager
134134
```
135135

136-
Create and apply a ClusterRoleBinding to associate the "flux" user with the `dws-workload-manager` ClusterRole:
136+
If the "flux" user requires only the normal WLM permissions, then create and apply a ClusterRoleBinding to associate the "flux" user with the `dws-workload-manager` ClusterRole.
137137

138-
ClusterRoleBinding
138+
The `dws-workload-manager role is defined in [workload_manager_role.yaml](https://github.com/DataWorkflowServices/dws/blob/master/config/rbac/workload_manager_role.yaml).
139+
140+
ClusterRoleBinding for WLM permissions only:
139141
```yaml
140142
apiVersion: rbac.authorization.k8s.io/v1
141143
kind: ClusterRoleBinding
@@ -151,4 +153,24 @@ roleRef:
151153
apiGroup: rbac.authorization.k8s.io
152154
```
153155

156+
If the "flux" user requires the normal WLM permissions as well as some of the NNF permissions, perhaps to collect some NNF resources for debugging, then create and apply a ClusterRoleBinding to associate the "flux" user with the `nnf-workload-manager` ClusterRole.
157+
158+
The `nnf-workload-manager` role is defined in [workload_manager_nnf_role.yaml](https://github.com/NearNodeFlash/nnf-sos/blob/master/config/rbac/workload_manager_nnf_role.yaml).
159+
160+
ClusterRoleBinding for WLM and NNF permissions:
161+
```yaml
162+
apiVersion: rbac.authorization.k8s.io/v1
163+
kind: ClusterRoleBinding
164+
metadata:
165+
name: flux
166+
subjects:
167+
- kind: User
168+
name: flux
169+
apiGroup: rbac.authorization.k8s.io
170+
roleRef:
171+
kind: ClusterRole
172+
name: nnf-workload-manager
173+
apiGroup: rbac.authorization.k8s.io
174+
```
175+
154176
The WLM should then use the kubeconfig file associated with this "flux" user to access the DataWorkflowServices API and the Rabbit system.

0 commit comments

Comments
 (0)