Skip to content

Instantly share code, notes, and snippets.

@richardsonlima
Created March 29, 2021 00:10
Show Gist options
  • Save richardsonlima/8bcdbea4977ec264c3e186f055a68571 to your computer and use it in GitHub Desktop.
Save richardsonlima/8bcdbea4977ec264c3e186f055a68571 to your computer and use it in GitHub Desktop.
cluster-prep-for-chaos.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: richardsonlima-chaos-demo
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: chaos-sa
namespace: richardsonlima-chaos-demo
labels:
name: pod-delete-sa
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: chaos-sa
namespace: richardsonlima-chaos-demo
labels:
name: chaos-sa
rules:
- apiGroups: ["","litmuschaos.io","batch","apps"]
resources: ["pods","deployments","pods/log","events","jobs","chaosengines","chaosexperiments","chaosresults"]
verbs: ["create","list","get","patch","update","delete","deletecollection"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: chaos-sa
namespace: richardsonlima-chaos-demo
labels:
name: pod-delete-sa
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: chaos-sa
subjects:
- kind: ServiceAccount
name: chaos-sa
namespace: richardsonlima-chaos-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment