-
Notifications
You must be signed in to change notification settings - Fork 6
/
sn.yaml
126 lines (126 loc) · 3.36 KB
/
sn.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: varlog-sn
namespace: default
labels:
app: varlog-sn
name: varlog-sn
spec:
selector:
matchLabels:
name: varlog-sn
template:
metadata:
labels:
app: varlog-sn
name: varlog-sn
spec:
volumes:
- name: varlog-sn-data
hostPath:
path: /varlog/data
type: DirectoryOrCreate
initContainers:
- name: volume-perm
image: mdock.daumkakao.io/busybox:stable
command:
- "sh"
- "-c"
- "chmod -R 777 /varlog/data"
volumeMounts:
- name: varlog-sn-data
mountPath: /varlog/data
imagePullPolicy: IfNotPresent
containers:
- name: varlog-sn
image: idock.daumkakao.io/varlog/varlog-sn:latest
command:
- "python3"
- "/varlog/bin/vsn.py"
ports:
- name: rpc
containerPort: 9091
env:
- name: TZ
value: Asia/Seoul
- name: VMS_ADDRESS
value: "$(VARLOG_VMS_RPC_SERVICE_HOST):$(VARLOG_VMS_RPC_SERVICE_PORT)"
- name: VOLUMES
value: /varlog/data
- name: TELEMETRY
value: "localhost:4317"
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: varlog-sn-data
mountPath: /varlog/data
readinessProbe:
exec:
command:
- "sh"
- "-c"
- "/varlog/tools/grpc_health_probe -addr=${HOST_IP}:9091"
periodSeconds: 5
livenessProbe:
exec:
command:
- "sh"
- "-c"
- "/varlog/tools/grpc_health_probe -addr=${HOST_IP}:9091"
periodSeconds: 10
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 60
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: varlog-type
operator: In
values:
- varlog-sn
- key: varlog-type
operator: NotIn
values:
- "telemetry"
# The podAntiAffinity in this is not effective. See https://github.com/kubernetes/kubernetes/issues/29276.
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- "varlog-mr"
- "varlog-vms"
- "prometheus"
- "jaeger"
- key: "component"
operator: In
values:
- "otel-collector"
topologyKey: "kubernetes.io/hostname"
schedulerName: default-scheduler
dnsConfig:
nameservers:
- 10.20.30.40
searches:
- dakao.io
- krane.iwilab.com
options:
- name: timeout
value: "1"
- name: attempts
value: "2"
- name: rotate
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
revisionHistoryLimit: 10