Skip to content

Commit

Permalink
Add user roles (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Feb 18, 2018
1 parent 76f1855 commit 1a532f9
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
41 changes: 41 additions & 0 deletions chart/stable/stash/templates/user-roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{ if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: appscode:stash:edit
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups:
- stash.appscode.com
resources:
- restics
- backups
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: appscode:stash:view
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- stash.appscode.com
resources:
- restics
- backups
verbs:
- get
- list
- watch
{{ end }}
39 changes: 39 additions & 0 deletions hack/deploy/user-roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: appscode:stash:edit
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rules:
- apiGroups:
- stash.appscode.com
resources:
- restics
- backups
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: appscode:stash:view
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- stash.appscode.com
resources:
- restics
- backups
verbs:
- get
- list
- watch

0 comments on commit 1a532f9

Please sign in to comment.