Skip to content

Commit

Permalink
NodeTopologyResource ClusterRole and ClusterRoleBinding
Browse files Browse the repository at this point in the history
 - Required to access NodeResourceTopology CRD instances
 - Update minor formatting issues

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Alexey Perevalov <alexey.perevalov@huawei.com>
  • Loading branch information
swatisehgal authored and AlexeyPerevalov committed Aug 13, 2020
1 parent 0fbcd0a commit f3b68c7
Showing 1 changed file with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ participating-sigs:
reviewers:
- "@dchen1107"
- "@derekwaynecarr"
- "@klueska"
approvers:
- "@dchen1107"
- "@derekwaynecarr"
creation-date: 2020-06-19
last-updated: 2020-06-19
last-updated: 2020-08-12
status: implementable
see-also:
- "/keps/sig-scheduling/20200612-deducted-topology-manager.md"
Expand Down Expand Up @@ -169,6 +170,41 @@ One CRD instance contains information of available resources of the appropriate

### Integration into Node Feature Discovery

In order to allow the NFD-master Daemon to create, get, update, delete NodeResourceTopology CRD instances, ClusterRole and ClusterRoleBinding would have to be configured as below:

``` yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: noderesourcetopology-handler
rules:
- apiGroups: ["topology.node.k8s.io"]
resources: ["noderesourcetopologies"]
verbs: ["*"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["*"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: handle-noderesourcetopology
subjects:
- kind: ServiceAccount
name: noderesourcetopology-account
namespace: default
roleRef:
kind: ClusterRole
name: noderesourcetopology-handler
apiGroup: rbac.authorization.k8s.io
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: noderesourcetopology-account
```
`serviceAccountName: noderesourcetopology-account` would have to be added to the manifest file of the Daemon.

### Graduation Criteria

Expand Down

0 comments on commit f3b68c7

Please sign in to comment.