blob: 1babb0589750499bc03026603d731d186b65c999 [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:
BorislavG8bfc6cf2018-02-27 15:04:26 +00005 name: aai-elasticsearch
6 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khinda4b881972017-08-30 14:24:02 +00007spec:
vaibhav_16deca97d3fd2018-02-14 05:32:10 +00008 replicas: {{ .Values.elasticsearchReplicas }}
Mandeep Khinda4b881972017-08-30 14:24:02 +00009 selector:
10 matchLabels:
BorislavG8bfc6cf2018-02-27 15:04:26 +000011 app: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000012 template:
13 metadata:
14 labels:
BorislavG8bfc6cf2018-02-27 15:04:26 +000015 app: aai-elasticsearch
16 name: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000017 spec:
mayankg27034e6c9332018-02-05 17:18:18 +000018 initContainers:
19 - command:
20 - /bin/sh
21 - -c
22 - |
23 mkdir -p /logroot/elasticsearch/es-data
24 chmod -R 777 /logroot/elasticsearch/es-data
25 chown -R root:root /logroot
26 env:
27 - name: NAMESPACE
28 valueFrom:
29 fieldRef:
30 apiVersion: v1
31 fieldPath: metadata.namespace
32 securityContext:
33 privileged: true
34 image: {{ .Values.image.es_bb }}
35 imagePullPolicy: {{ .Values.pullPolicy }}
36 name: init-sysctl
37 volumeMounts:
38 - name: elasticsearch-data
39 mountPath: /logroot/
BorislavG8bfc6cf2018-02-27 15:04:26 +000040 hostname: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000041 containers:
BorislavG8bfc6cf2018-02-27 15:04:26 +000042 - name: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000043 image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}"
44 imagePullPolicy: {{ .Values.pullPolicy }}
45 ports:
46 - containerPort: 9200
47 readinessProbe:
48 tcpSocket:
49 port: 9200
50 initialDelaySeconds: 5
51 periodSeconds: 10
52 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030053 - name: localtime
54 mountPath: /etc/localtime
55 readOnly: true
Mandeep Khinda4b881972017-08-30 14:24:02 +000056 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000057 subPath: elasticsearch.yml
Mandeep Khinda4b881972017-08-30 14:24:02 +000058 mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
59 - name: elasticsearch-data
60 mountPath: /usr/share/elasticsearch/data
61 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030062 - name: localtime
63 hostPath:
64 path: /etc/localtime
Mandeep Khinda4b881972017-08-30 14:24:02 +000065 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000066 configMap:
67 name: aai-elasticsearch-configmap
Mandeep Khinda4b881972017-08-30 14:24:02 +000068 - name: elasticsearch-data
69 hostPath:
kerenjb19df802018-02-25 11:19:53 +000070 path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data"
Mandeep Khinda4b881972017-08-30 14:24:02 +000071 imagePullSecrets:
72 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
mayankg27034e6c9332018-02-05 17:18:18 +000073#{{ end }}