-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpod.yml
409 lines (409 loc) · 14.1 KB
/
pod.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
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
apiVersion: apps/v1
kind: StatefulSet
metadata:
creationTimestamp: "2020-11-29T13:53:14Z"
generation: 1
labels:
common.k8s.elastic.co/template-hash: "1024124154"
common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: elasticsearch
elasticsearch.k8s.elastic.co/statefulset-name: elasticsearch-es-data
name: elasticsearch-es-data
namespace: default
ownerReferences:
- apiVersion: elasticsearch.k8s.elastic.co/v1
blockOwnerDeletion: true
controller: true
kind: Elasticsearch
name: elasticsearch
uid: 01c6bbc1-b616-4ffa-8430-a2032444eaac
resourceVersion: "17138"
selfLink: /apis/apps/v1/namespaces/default/statefulsets/elasticsearch-es-data
uid: 253f30f9-3489-41ba-9f4f-65ad013ab955
spec:
podManagementPolicy: Parallel
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: elasticsearch
elasticsearch.k8s.elastic.co/statefulset-name: elasticsearch-es-data
serviceName: elasticsearch-es-data
template:
metadata:
annotations:
co.elastic.logs/module: elasticsearch
creationTimestamp: null
labels:
common.k8s.elastic.co/type: elasticsearch
elasticsearch.k8s.elastic.co/cluster-name: elasticsearch
elasticsearch.k8s.elastic.co/config-hash: "3185571143"
elasticsearch.k8s.elastic.co/http-scheme: https
elasticsearch.k8s.elastic.co/node-data: "true"
elasticsearch.k8s.elastic.co/node-ingest: "true"
elasticsearch.k8s.elastic.co/node-master: "false"
elasticsearch.k8s.elastic.co/node-ml: "true"
elasticsearch.k8s.elastic.co/statefulset-name: elasticsearch-es-data
elasticsearch.k8s.elastic.co/version: 7.9.2
spec:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
elasticsearch.k8s.elastic.co/cluster-name: elasticsearch
topologyKey: kubernetes.io/hostname
weight: 100
automountServiceAccountToken: false
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms2g -Xmx2g
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: PROBE_PASSWORD_PATH
value: /mnt/elastic-internal/probe-user/elastic-internal-probe
- name: PROBE_USERNAME
value: elastic-internal-probe
- name: READINESS_PROBE_PROTOCOL
value: https
- name: HEADLESS_SERVICE_NAME
value: elasticsearch-es-data
- name: NSS_SDB_USE_CACHE
value: "no"
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command:
- bash
- -c
- /mnt/elastic-internal/scripts/pre-stop-hook-script.sh
name: elasticsearch
ports:
- containerPort: 9200
name: https
protocol: TCP
- containerPort: 9300
name: transport
protocol: TCP
readinessProbe:
exec:
command:
- bash
- -c
- /mnt/elastic-internal/scripts/readiness-probe-script.sh
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 5
resources:
limits:
cpu: "2"
memory: 3Gi
requests:
cpu: 500m
memory: 2Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /mnt/elastic-internal/downward-api
name: downward-api
readOnly: true
- mountPath: /usr/share/elasticsearch/bin
name: elastic-internal-elasticsearch-bin-local
- mountPath: /mnt/elastic-internal/elasticsearch-config
name: elastic-internal-elasticsearch-config
readOnly: true
- mountPath: /usr/share/elasticsearch/config
name: elastic-internal-elasticsearch-config-local
- mountPath: /usr/share/elasticsearch/plugins
name: elastic-internal-elasticsearch-plugins-local
- mountPath: /usr/share/elasticsearch/config/http-certs
name: elastic-internal-http-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/probe-user
name: elastic-internal-probe-user
readOnly: true
- mountPath: /usr/share/elasticsearch/config/transport-remote-certs/
name: elastic-internal-remote-certificate-authorities
readOnly: true
- mountPath: /mnt/elastic-internal/scripts
name: elastic-internal-scripts
readOnly: true
- mountPath: /usr/share/elasticsearch/config/transport-certs
name: elastic-internal-transport-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/unicast-hosts
name: elastic-internal-unicast-hosts
readOnly: true
- mountPath: /mnt/elastic-internal/xpack-file-realm
name: elastic-internal-xpack-file-realm
readOnly: true
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-data
- mountPath: /usr/share/elasticsearch/logs
name: elasticsearch-logs
- mountPath: /shared-mount
name: host-mount
dnsPolicy: ClusterFirst
initContainers:
- command:
- bash
- -c
- /mnt/elastic-internal/scripts/prepare-fs.sh
env:
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
imagePullPolicy: IfNotPresent
name: elastic-internal-init-filesystem
resources:
limits:
cpu: 100m
memory: 50Mi
requests:
cpu: 100m
memory: 50Mi
securityContext:
privileged: false
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /mnt/elastic-internal/elasticsearch-config-local
name: elastic-internal-elasticsearch-config-local
- mountPath: /mnt/elastic-internal/elasticsearch-plugins-local
name: elastic-internal-elasticsearch-plugins-local
- mountPath: /mnt/elastic-internal/elasticsearch-bin-local
name: elastic-internal-elasticsearch-bin-local
- mountPath: /mnt/elastic-internal/transport-certificates
name: elastic-internal-transport-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/scripts
name: elastic-internal-scripts
readOnly: true
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-data
- mountPath: /usr/share/elasticsearch/logs
name: elasticsearch-logs
- mountPath: /mnt/elastic-internal/downward-api
name: downward-api
readOnly: true
- mountPath: /mnt/elastic-internal/elasticsearch-config
name: elastic-internal-elasticsearch-config
readOnly: true
- mountPath: /usr/share/elasticsearch/config/http-certs
name: elastic-internal-http-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/probe-user
name: elastic-internal-probe-user
readOnly: true
- mountPath: /usr/share/elasticsearch/config/transport-remote-certs/
name: elastic-internal-remote-certificate-authorities
readOnly: true
- mountPath: /mnt/elastic-internal/unicast-hosts
name: elastic-internal-unicast-hosts
readOnly: true
- mountPath: /mnt/elastic-internal/xpack-file-realm
name: elastic-internal-xpack-file-realm
readOnly: true
- mountPath: /shared-mount
name: host-mount
- command:
- sh
- -c
- sysctl -w vm.max_map_count=262144
env:
- name: POD_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.2
imagePullPolicy: IfNotPresent
name: sysctl
resources: {}
securityContext:
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /mnt/elastic-internal/downward-api
name: downward-api
readOnly: true
- mountPath: /usr/share/elasticsearch/bin
name: elastic-internal-elasticsearch-bin-local
- mountPath: /mnt/elastic-internal/elasticsearch-config
name: elastic-internal-elasticsearch-config
readOnly: true
- mountPath: /usr/share/elasticsearch/config
name: elastic-internal-elasticsearch-config-local
- mountPath: /usr/share/elasticsearch/plugins
name: elastic-internal-elasticsearch-plugins-local
- mountPath: /usr/share/elasticsearch/config/http-certs
name: elastic-internal-http-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/probe-user
name: elastic-internal-probe-user
readOnly: true
- mountPath: /usr/share/elasticsearch/config/transport-remote-certs/
name: elastic-internal-remote-certificate-authorities
readOnly: true
- mountPath: /mnt/elastic-internal/scripts
name: elastic-internal-scripts
readOnly: true
- mountPath: /usr/share/elasticsearch/config/transport-certs
name: elastic-internal-transport-certificates
readOnly: true
- mountPath: /mnt/elastic-internal/unicast-hosts
name: elastic-internal-unicast-hosts
readOnly: true
- mountPath: /mnt/elastic-internal/xpack-file-realm
name: elastic-internal-xpack-file-realm
readOnly: true
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-data
- mountPath: /usr/share/elasticsearch/logs
name: elasticsearch-logs
- mountPath: /shared-mount
name: host-mount
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 180
volumes:
- downwardAPI:
defaultMode: 420
items:
- fieldRef:
apiVersion: v1
fieldPath: metadata.labels
path: labels
name: downward-api
- emptyDir: {}
name: elastic-internal-elasticsearch-bin-local
- name: elastic-internal-elasticsearch-config
secret:
defaultMode: 420
optional: false
secretName: elasticsearch-es-data-es-config
- emptyDir: {}
name: elastic-internal-elasticsearch-config-local
- emptyDir: {}
name: elastic-internal-elasticsearch-plugins-local
- name: elastic-internal-http-certificates
secret:
defaultMode: 420
optional: false
secretName: elasticsearch-es-http-certs-internal
- name: elastic-internal-probe-user
secret:
defaultMode: 420
items:
- key: elastic-internal-probe
path: elastic-internal-probe
optional: false
secretName: elasticsearch-es-internal-users
- name: elastic-internal-remote-certificate-authorities
secret:
defaultMode: 420
optional: false
secretName: elasticsearch-es-remote-ca
- configMap:
defaultMode: 493
name: elasticsearch-es-scripts
optional: false
name: elastic-internal-scripts
- name: elastic-internal-transport-certificates
secret:
defaultMode: 420
optional: false
secretName: elasticsearch-es-transport-certificates
- configMap:
defaultMode: 420
name: elasticsearch-es-unicast-hosts
optional: false
name: elastic-internal-unicast-hosts
- name: elastic-internal-xpack-file-realm
secret:
defaultMode: 420
optional: false
secretName: elasticsearch-es-xpack-file-realm
- name: elasticsearch-data
persistentVolumeClaim:
claimName: claim-name-placeholder
- emptyDir: {}
name: elasticsearch-logs
- hostPath:
path: /shared-mount
type: DirectoryOrCreate
name: host-mount
updateStrategy:
type: OnDelete
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
name: elasticsearch-data
ownerReferences:
- apiVersion: elasticsearch.k8s.elastic.co/v1
blockOwnerDeletion: false
controller: true
kind: Elasticsearch
name: elasticsearch
uid: 01c6bbc1-b616-4ffa-8430-a2032444eaac
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: standard
volumeMode: Filesystem
status:
phase: Pending
status:
collisionCount: 0
currentReplicas: 2
currentRevision: elasticsearch-es-data-58f7f6cf7c
observedGeneration: 1
readyReplicas: 2
replicas: 2
updateRevision: elasticsearch-es-data-58f7f6cf7c
updatedReplicas: 2