forked from fivexl/kubernetes-events-to-slack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
59 lines (59 loc) · 1.58 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apiVersion: v1
kind: ServiceAccount
metadata:
name: k8s-events-to-slack-streamer
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: k8s-events-to-slack-streamer
rules:
- apiGroups: [""]
resources: ["events", "pods", "nodes"]
verbs: ["watch", "list"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["get", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: k8s-events-to-slack-streamer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: k8s-events-to-slack-streamer
subjects:
- kind: ServiceAccount
name: k8s-events-to-slack-streamer
namespace: observer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-events-to-slack-streamer
labels:
app: k8s-events-to-slack-streamer
spec:
replicas: 1
selector:
matchLabels:
app: k8s-events-to-slack-streamer
template:
metadata:
labels:
app: k8s-events-to-slack-streamer
spec:
automountServiceAccountToken: true
serviceAccountName: k8s-events-to-slack-streamer
containers:
- image: YOUR_IMAGE_IN_DOCKERHUB
imagePullPolicy: Always
name: k8s-events-to-slack-streamer
env:
- name: K8S_EVENTS_STREAMER_INCOMING_WEB_HOOK_URL
value: YOUR_SLACK_WEB_HOOK_URL
- name: K8S_EVENTS_STREAMER_SKIP_DELETE_EVENTS
value: "true"
- name: K8S_EVENTS_STREAMER_LIST_OF_REASONS_TO_SKIP
value: 'Scheduled ScalingReplicaSet Pulling Created Pulled Started SuccessfulMountVolume SuccessfulUnMountVolume SuccessfulCreate'