blob: d3535d07c63001311f4668faefdcb71eb3d73a8e [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:
vaibhav_16deca97d3fd2018-02-14 05:32:10 +00008 replicas: {{ .Values.elasticsearchReplicas }}
Mandeep Khinda4b881972017-08-30 14:24:02 +00009 selector:
10 matchLabels:
11 app: elasticsearch
12 template:
13 metadata:
14 labels:
15 app: elasticsearch
16 name: elasticsearch
17 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/
Mandeep Khinda4b881972017-08-30 14:24:02 +000040 hostname: elasticsearch
41 containers:
42 - name: elasticsearch
43 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:
mayankg27034e6c9332018-02-05 17:18:18 +000070 path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/"
Mandeep Khinda4b881972017-08-30 14:24:02 +000071 imagePullSecrets:
72 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
mayankg27034e6c9332018-02-05 17:18:18 +000073#{{ end }}