This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstatefulset-es-data.yaml
101 lines (101 loc) · 2.55 KB
/
statefulset-es-data.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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: es-data
labels:
app: elasticsearch
component: elasticsearch
spec:
selector:
matchLabels:
component: elasticsearch
role: data
serviceName: es-transport
replicas: 2
template:
metadata:
labels:
component: elasticsearch
http: disabled
role: data
spec:
securityContext:
runAsUser: 185
fsGroup: 185
containers:
- name: es-data
image: raaftech/elasticsearch:latest
imagePullPolicy: Always
env:
- name: ES_ALLOW_MMAPFS
value: "false"
- name: ES_CLUSTER_NAME
value: "es-cluster"
- name: ES_DISCOVERY_SERVICE
value: "es-transport"
- name: ES_INDEX_AUTO_CREATE
value: ".kibana*,.logstash*,.management*,.monitoring*,.security*,.triggered_watches*,.watcher-history*,.watches*"
- name: ES_INDEX_STORE_TYPE
value: "niofs"
- name: ES_NODE_DATA
value: "true"
- name: ES_NODE_INGEST
value: "false"
- name: ES_NODE_MASTER
value: "false"
- name: ES_NODE_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: PROCESSORS
valueFrom:
resourceFieldRef:
resource: limits.cpu
resources:
requests:
cpu: 1
memory: 8Gi
limits:
cpu: 2
memory: 8Gi
ports:
- containerPort: 9200
name: http
- containerPort: 9300
name: transport
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 60
successThreshold: 1
tcpSocket:
port: transport
timeoutSeconds: 3
readinessProbe:
failureThreshold: 3
httpGet:
path: /_cluster/health
port: http
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 6
volumeMounts:
- name: storage
mountPath: /elasticsearch/data
volumeClaimTemplates:
- metadata:
name: storage
annotations:
pv.beta.kubernetes.io/gid: "185"
spec:
storageClassName: glusterfs-storage-block
accessModes: [ ReadWriteOnce ]
resources:
requests:
storage: 40Gi