apiVersion: v1
kind: ConfigMap
metadata:
name: kubewatch
namespace: test
data:
.kubewatch.yaml: |
namespace: ""
handler:
slack:
token: <token>
channel: <channel>
resource:
deployment: false
replicationcontroller: false
replicaset: false
daemonset: false
services: true
pod: true
secret: false
configmap: false
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: kubewatch
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kubewatch
namespace: test
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubewatch
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kubewatch
subjects:
- kind: ServiceAccount
name: kubewatch
namespace: test
---
apiVersion: v1
kind: Pod
metadata:
name: kubewatch
namespace: test
spec:
serviceaccountName: kubewatch
containers:
- image: bitnami/kubewatch
imagePullPolicy: Always
name: kubewatch
volumeMounts:
- name: config-volume
mountPath: /root
restartPolicy: Always
volumes:
- name: config-volume
configMap:
name: kubewatch