Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the RBAC bits for the new copy-offload daemon #239

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions config/copy-offload/copy_offload_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: copy-offload-role
rules:
- apiGroups:
- lus.cray.hpe.com
resources:
- lustrefilesystems
verbs:
- get
- list
- watch
- apiGroups:
- dataworkflowservices.github.io
resources:
- workflows
verbs:
- get
- list
- watch
- apiGroups:
- dataworkflowservices.github.io
resources:
- clientmounts
verbs:
- get
- list
- watch
- apiGroups:
- nnf.cray.hpe.com
resources:
- nnfdatamovementprofiles
verbs:
- get
- list
- watch
- apiGroups:
- nnf.cray.hpe.com
resources:
- nnfnodes
verbs:
- get
- list
- watch
- apiGroups:
- nnf.cray.hpe.com
resources:
- nnfnodestorages
verbs:
- get
- list
- watch
- apiGroups:
- nnf.cray.hpe.com
resources:
- nnfstorages
verbs:
- get
- list
- watch
12 changes: 12 additions & 0 deletions config/copy-offload/copy_offload_role_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: copy-offload-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: copy-offload-role
subjects:
- kind: ServiceAccount
name: copy-offload
namespace: default
18 changes: 18 additions & 0 deletions config/copy-offload/copy_offload_service_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: copy-offload
namespace: default
---
# As of Kubernetes 1.24, ServiceAccount tokens are no longer automatically
# generated. Instead, manually create the secret and the token key in the
# data field will be automatically set.
apiVersion: v1
kind: Secret
metadata:
name: copy-offload
namespace: default
annotations:
kubernetes.io/service-account.name: copy-offload
kubernetes.io/service-account.namespace: default
type: kubernetes.io/service-account-token
14 changes: 14 additions & 0 deletions config/copy-offload/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
namePrefix: nnf-dm-

resources:
- copy_offload_service_account.yaml
- copy_offload_role.yaml
- copy_offload_role_binding.yaml

configurations:
- kustomizeconfig.yaml
4 changes: 4 additions & 0 deletions config/copy-offload/kustomizeconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
namePrefix:
- path: metadata/annotations/kubernetes.io\/service-account.name
namespace:
- path: metadata/annotations/kubernetes.io\/service-account.namespace
2 changes: 1 addition & 1 deletion config/dp0/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resources:
- ../default
- ../top

patches:
# Arguments for the controller manager that are specific to dp0
Expand Down
2 changes: 1 addition & 1 deletion config/kind/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resources:
- ../default
- ../top

patches:
# Arguments for the controller manager that are specific to kind
Expand Down
3 changes: 3 additions & 0 deletions config/top/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- ../default
- ../copy-offload
Loading