-
Notifications
You must be signed in to change notification settings - Fork 6
/
backpack_daemonset.yml
executable file
·63 lines (63 loc) · 1.76 KB
/
backpack_daemonset.yml
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
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: backpack-{UUID}
namespace: {NAMESPACE}
spec:
selector:
matchExpressions:
- key: app
operator: In
values:
- backpack-{UUID}
template:
metadata:
labels:
name: backpack-{UUID}
app: backpack-{UUID}
spec:
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
####
# TO target specific nodes with a matching label update the below
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: [LABEL NAME]
# operator: In
# values:
# - [LABEL VALUE]
####
containers:
- name: backpack
image: {IMAGE}
command: ["/bin/sh", "-c"]
args: ["python3 stockpile-wrapper.py {ELASTICSEARCH_SERVER} -u {UUID} -n $my_node_name -N $my_pod_name --force --sslskipverify {ES_SSL} && touch /tmp/indexed; sleep infinity"]
imagePullPolicy: Always
# Set privileged to the appropriate value [true|false]
securityContext:
privileged: {PRIV}
readinessProbe:
exec:
command:
- ls
- /tmp/indexed
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 500
env:
- name: my_node_name
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: my_pod_name
valueFrom:
fieldRef:
fieldPath: metadata.name
# If using a specific service account name set it below
serviceAccountName: {ACCOUNT}
terminationGracePeriodSeconds: 30