Skip to content

Commit

Permalink
Add role and rolebinding for graphscope charts (#1382)
Browse files Browse the repository at this point in the history
Co-authored-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
lidongze0629 and sighingnow committed Mar 19, 2022
1 parent c921cd6 commit 91f4248
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
26 changes: 1 addition & 25 deletions charts/graphscope/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,7 @@ GraphScope rely on some permissions to delete resources.

```shell
# example for `default` ServiceAccount with `default` namespace
$ cat role_and_binding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: grole
namespace: default
rules:
- apiGroups: ["apps", "extensions", ""]
resources: ["configmaps", "deployments", "deployments/status", "endpoints", "events", "pods", "pods/log", "pods/exec", "pods/status", "services", "replicasets"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: grole-binding
namespace: default
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: Role
name: grole
apiGroup: rbac.authorization.k8s.io

$ wget https://raw.githubusercontent.com/alibaba/GraphScope/main/charts/role_and_binding.yaml
$ kubectl create -f ./role_and_binding.yaml
```

Expand Down
23 changes: 23 additions & 0 deletions charts/role_and_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: grole
namespace: default
rules:
- apiGroups: ["apps", "extensions", ""]
resources: ["configmaps", "deployments", "deployments/status", "endpoints", "events", "pods", "pods/log", "pods/exec", "pods/status", "services", "replicasets"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: grole-binding
namespace: default
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: Role
name: grole
apiGroup: rbac.authorization.k8s.io

0 comments on commit 91f4248

Please sign in to comment.