blob: baa1cb8523686ba03fd2786e9701423a240b5251 [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableAaiElasticsearch }}
Mandeep Khinda4b881972017-08-30 14:24:02 +00002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: elasticsearch
6 namespace: "{{ .Values.nsPrefix }}-aai"
7spec:
8 selector:
9 matchLabels:
10 app: elasticsearch
11 template:
12 metadata:
13 labels:
14 app: elasticsearch
15 name: elasticsearch
16 spec:
mayankg27034e6c9332018-02-05 17:18:18 +000017 initContainers:
18 - command:
19 - /bin/sh
20 - -c
21 - |
22 mkdir -p /logroot/elasticsearch/es-data
23 chmod -R 777 /logroot/elasticsearch/es-data
24 chown -R root:root /logroot
25 env:
26 - name: NAMESPACE
27 valueFrom:
28 fieldRef:
29 apiVersion: v1
30 fieldPath: metadata.namespace
31 securityContext:
32 privileged: true
33 image: {{ .Values.image.es_bb }}
34 imagePullPolicy: {{ .Values.pullPolicy }}
35 name: init-sysctl
36 volumeMounts:
37 - name: elasticsearch-data
38 mountPath: /logroot/
Mandeep Khinda4b881972017-08-30 14:24:02 +000039 hostname: elasticsearch
40 containers:
41 - name: elasticsearch
42 image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}"
43 imagePullPolicy: {{ .Values.pullPolicy }}
44 ports:
45 - containerPort: 9200
46 readinessProbe:
47 tcpSocket:
48 port: 9200
49 initialDelaySeconds: 5
50 periodSeconds: 10
51 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030052 - name: localtime
53 mountPath: /etc/localtime
54 readOnly: true
Mandeep Khinda4b881972017-08-30 14:24:02 +000055 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000056 subPath: elasticsearch.yml
Mandeep Khinda4b881972017-08-30 14:24:02 +000057 mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
58 - name: elasticsearch-data
59 mountPath: /usr/share/elasticsearch/data
60 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030061 - name: localtime
62 hostPath:
63 path: /etc/localtime
Mandeep Khinda4b881972017-08-30 14:24:02 +000064 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000065 configMap:
66 name: aai-elasticsearch-configmap
Mandeep Khinda4b881972017-08-30 14:24:02 +000067 - name: elasticsearch-data
68 hostPath:
mayankg27034e6c9332018-02-05 17:18:18 +000069 path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/"
Mandeep Khinda4b881972017-08-30 14:24:02 +000070 imagePullSecrets:
71 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
mayankg27034e6c9332018-02-05 17:18:18 +000072#{{ end }}