forked from jeefy/kippy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
106 lines (106 loc) · 2.25 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
apiVersion: v1
kind: Secret
metadata:
name: kippy-secret
namespace: kube-system
type: Opaque
stringData:
discordWebhook: ""
slackWebhook: ""
genericWebhook: ""
sendgridApiKey: ""
email: ""
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kippy-sa
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kippy
rules:
- apiGroups: ["events.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["pods", "events"]
verbs: ["get", "watch", "list"]
- apiGroups: ["metrics.k8s.io"]
resources: ["*"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kippy-binding
roleRef: # points to the Role
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kippy
subjects: # points to the ServiceAccount
- kind: ServiceAccount
name: kippy-sa # service account to bind to
namespace: kube-system # ns of service account
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: kippy
name: kippy
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: kippy
strategy:
type: Recreate
template:
metadata:
labels:
app: kippy
spec:
serviceAccountName: kippy-sa
containers:
- env:
- name: SENDGRID_API_KEY
valueFrom:
secretKeyRef:
key: sendgridApiKey
name: kippy-secret
- name: DISCORD_WEBHOOK
valueFrom:
secretKeyRef:
key: discordWebhook
name: kippy-secret
- name: SLACK_WEBHOOK
valueFrom:
secretKeyRef:
key: slackWebhook
name: kippy-secret
- name: GENERIC_WEBHOOK
valueFrom:
secretKeyRef:
key: genericWebhook
name: kippy-secret
- name: EMAIL
valueFrom:
secretKeyRef:
key: email
name: kippy-secret
image: ghcr.io/jeefy/kippy:main
imagePullPolicy: Always
name: kippy
resources:
limits:
cpu: "1"
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
---