Skip to content

Commit 32d4ecc

Browse files
committed
Add default cluster roles for running chaos mesh on GKE
1 parent 6b6679e commit 32d4ecc

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
kind: ClusterRole
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
metadata:
4+
name: role-cluster-manager-pdmas
5+
rules:
6+
- apiGroups: ['']
7+
resources: ['pods', 'namespaces']
8+
verbs: ['get', 'watch', 'list']
9+
- apiGroups:
10+
- chaos-mesh.org
11+
resources: ['*']
12+
verbs: ['get', 'list', 'watch', 'create', 'delete', 'patch', 'update']
13+
---
14+
kind: ClusterRoleBinding
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
metadata:
17+
name: cluster-manager-binding
18+
namespace: chaos-mesh
19+
subjects:
20+
# Google Cloud user account
21+
- kind: User
22+
name: USER_ACCOUNT
23+
roleRef:
24+
kind: ClusterRole
25+
name: role-cluster-manager-pdmas
26+
apiGroup: rbac.authorization.k8s.io

chaos-mesh/schedule.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: chaos-mesh.org/v1alpha1
2+
kind: Schedule
3+
metadata:
4+
name: schedule-pod-kill-example
5+
spec:
6+
schedule: "@every 1h"
7+
type: "PodChaos"
8+
historyLimit: 5
9+
concurrencyPolicy: Forbid
10+
podChaos:
11+
action: "pod-kill"
12+
mode: one
13+
selector:
14+
labelSelectors:
15+
"app.kubernetes.io/component": "tikv"

0 commit comments

Comments
 (0)