wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
322 stars 58 forks source link

Add RBAC to README.md #25

Closed omerozery closed 6 years ago

omerozery commented 6 years ago

This is just an example that works for me..

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: kube-slack
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "watch", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kube-slack
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: kube-slack
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kube-slack
subjects:
  - kind: ServiceAccount
    name: kube-slack
    namespace: kube-system
whs commented 6 years ago

Could you please submit this as a PR?

I see @jstriebel also wrote similar RBAC in his Helm chart

whs commented 6 years ago

Closed in #26