-
Notifications
You must be signed in to change notification settings - Fork 123
/
guard-pod.yaml
55 lines (55 loc) · 1.51 KB
/
guard-pod.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
apiVersion: v1
kind: Pod
metadata:
namespace: # Value set by operator
name: # Value set by operator
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
labels:
app: guard
ownerReferences: # Value set by operator
spec:
affinity: # Value set by operator
priorityClassName: "system-cluster-critical"
terminationGracePeriodSeconds: 3
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
operator: Exists
- key: node.kubernetes.io/not-ready
effect: NoExecute
operator: Exists
- key: node.kubernetes.io/unreachable
effect: NoExecute
operator: Exists
- key: node-role.kubernetes.io/etcd
operator: Exists
effect: NoSchedule
containers:
- name: guard
image: # Value set by operator
imagePullPolicy: IfNotPresent
terminationMessagePolicy: FallbackToLogsOnError
command:
- /bin/bash
args:
- -c
- |
# properly handle TERM and exit as soon as it is signaled
set -euo pipefail
trap 'jobs -p | xargs -r kill; exit 0' TERM
sleep infinity & wait
readinessProbe:
failureThreshold: 3
httpGet:
host: # Value set by operator
path: # Value set by operator
port: # Value set by operator
scheme: HTTPS
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 5
resources:
requests:
cpu: 10m
memory: 5Mi