-
Notifications
You must be signed in to change notification settings - Fork 114
/
es-client.yaml
103 lines (103 loc) · 2.56 KB
/
es-client.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: es-client
labels:
component: elasticsearch
role: client
spec:
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
component: elasticsearch
role: client
annotations:
scheduler.alpha.kubernetes.io/affinity: |
{
"podAntiAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": [
{
"labelSelector": {
"matchLabels": {
"component": "elasticsearch",
"role": "client"
}
},
"topologyKey": "kubernetes.io/hostname"
}
]
}
}
spec:
containers:
- name: es-client
securityContext:
privileged: true
capabilities:
add:
- IPC_LOCK
image: kayrus/docker-elasticsearch-kubernetes:2.4.4
args:
- /run.sh
- -Des.path.conf=/etc/elasticsearch
readinessProbe:
httpGet:
path: /
port: 9200
scheme: HTTP
timeoutSeconds: 1
successThreshold: 3
livenessProbe:
httpGet:
path: /_cluster/health
port: 9200
scheme: HTTP
initialDelaySeconds: 360
timeoutSeconds: 2
imagePullPolicy: Always
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CLUSTER_NAME
valueFrom:
configMapKeyRef:
name: es-env
key: es-cluster-name
- name: NODE_MASTER
value: 'false'
- name: NODE_DATA
value: 'false'
- name: HTTP_ENABLE
value: 'true'
- name: ES_HEAP_SIZE
valueFrom:
configMapKeyRef:
name: es-env
key: es-client-heap
- name: ES_CLIENT_ENDPOINT
valueFrom:
configMapKeyRef:
name: es-env
key: es-client-endpoint
ports:
- name: transport
containerPort: 9300
protocol: TCP
- name: http
containerPort: 9200
protocol: TCP
volumeMounts:
- name: es-config
mountPath: /etc/elasticsearch
volumes:
- name: es-config
configMap:
name: es-config