-
Notifications
You must be signed in to change notification settings - Fork 4
/
elasticsearch-eck.yml
154 lines (154 loc) · 5.66 KB
/
elasticsearch-eck.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
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: MyElasticSearch
spec:
version: 8.11.3
auth:
fileRealm:
- secretName: elasticsearch-secret
nodeSets:
- name: master
count: 3
config:
# most Elasticsearch configuration parameters are possible to set, e.g: node.attr.attr_name: attr_value
#node.roles: ["master", "data", "ingest", "ml"]
node.roles: ["master"]
script.painless.regex.enabled: true
http.cors.enabled: true
http.cors.allow-origin: "*"
#network.host: _site_ Forbidden: Configuration setting is reserved for internal use
#node.name: ${HOSTNAME} Forbidden: Configuration setting is reserved for internal use
bootstrap.memory_lock: true
#xpack.security.transport.ssl.enabled: true Forbidden: Configuration setting is reserved for internal use
cluster.max_shards_per_node: 10000
podTemplate:
spec:
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch repository-s3
- name: add-aws-keys
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: elastic-eck-snapshots
key: access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: elastic-eck-snapshots
key: access-secret-key
command:
- sh
- -c
- |
echo $AWS_ACCESS_KEY_ID | bin/elasticsearch-keystore add --stdin --force s3.client.default.access_key
echo $AWS_SECRET_ACCESS_KEY | bin/elasticsearch-keystore add --stdin --force s3.client.default.secret_key
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: elasticsearch.k8s.elastic.co/statefulset-name
operator: In
values:
- <name>-es-master
topologyKey: kubernetes.io/hostname
containers:
- name: elasticsearch
readinessProbe:
exec:
command:
- bash
- -c
- /mnt/elastic-internal/scripts/readiness-probe-script.sh
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 12
successThreshold: 1
timeoutSeconds: 12
env:
- name: READINESS_PROBE_TIMEOUT
value: "10"
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storageClassName: gp3
- name: data
count: 5
config:
# most Elasticsearch configuration parameters are possible to set, e.g: node.attr.attr_name: attr_value
#node.roles: ["master", "data", "ingest", "ml"]
node.roles: ["data", "ingest"]
script.painless.regex.enabled: true
http.cors.enabled: true
http.cors.allow-origin: "*"
#network.host: _site_ Forbidden: Configuration setting is reserved for internal use
#node.name: ${HOSTNAME} Forbidden: Configuration setting is reserved for internal use
bootstrap.memory_lock: true
#xpack.security.transport.ssl.enabled: true Forbidden: Configuration setting is reserved for internal use
cluster.max_shards_per_node: 10000
podTemplate:
spec:
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch repository-s3
- name: add-aws-keys
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: elastic-eck-snapshots
key: access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: elastic-eck-snapshots
key: access-secret-key
command:
- sh
- -c
- |
echo $AWS_ACCESS_KEY_ID | bin/elasticsearch-keystore add --stdin --force s3.client.default.access_key
echo $AWS_SECRET_ACCESS_KEY | bin/elasticsearch-keystore add --stdin --force s3.client.default.secret_key
containers:
- name: elasticsearch
readinessProbe:
exec:
command:
- bash
- -c
- /mnt/elastic-internal/scripts/readiness-probe-script.sh
failureThreshold: 3
initialDelaySeconds: 10
periodSeconds: 12
successThreshold: 1
timeoutSeconds: 12
env:
- name: READINESS_PROBE_TIMEOUT
value: "10"
volumeClaimTemplates:
- metadata:
name: elasticsearch-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: gp3