-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment-slack-token.yaml
65 lines (65 loc) · 2.01 KB
/
deployment-slack-token.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
# slack token as a file
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: kube-saver
name: kube-saver-operator
labels:
app: kube-saver-operator
spec:
replicas: 1
selector:
matchLabels:
app: kube-saver-operator
template:
metadata:
labels:
app: kube-saver-operator
spec:
serviceAccountName: kube-saver
containers:
- name: kube-saver-operator
image: maheshrayas/kube-saver:v0.9.2
args:
- "--rules=/config/rules.yaml" #rules for downscale
- "--interval=60" # every 60 secs, the controller will check the resources to downscale or upscale
- "--debug" # remove to set log as INFO
- "--comm-type=slack" # notification type is slack, pass this arg if you want notified to slack
- "--comm-details=<slackworkspace>" # slack workspace name, pass this arg if comm-type is set to slack
resources:
limits:
cpu: "1"
memory: 500Mi
requests:
cpu: "0.5"
memory: 100Mi
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false # Create tmp file for slack notification
runAsGroup: 1001
runAsNonRoot: true
runAsUser: 1001
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config-volume
mountPath: /config
- name: slack-api-token
mountPath: "/var/slack_token"
readOnly: true
- mountPath: /tmp
name: tmp-volume
volumes:
- name: tmp-volume
emptyDir: {}
- name: config-volume
configMap:
name: rules
- name: slack-api-token
secret:
secretName: slack-token
optional: false # default setting; "slack-token" must exist