yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableAaiElasticsearch }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 5 | name: aai-elasticsearch |
| 6 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 7 | spec: |
vaibhav_16dec | a97d3fd | 2018-02-14 05:32:10 +0000 | [diff] [blame] | 8 | replicas: {{ .Values.elasticsearchReplicas }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 9 | selector: |
| 10 | matchLabels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 11 | app: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 12 | template: |
| 13 | metadata: |
| 14 | labels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 15 | app: aai-elasticsearch |
| 16 | name: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 17 | spec: |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 18 | 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/ |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 40 | hostname: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 41 | containers: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 42 | - name: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 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: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 53 | - name: localtime |
| 54 | mountPath: /etc/localtime |
| 55 | readOnly: true |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 56 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 57 | subPath: elasticsearch.yml |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 58 | mountPath: /usr/share/elasticsearch/config/elasticsearch.yml |
| 59 | - name: elasticsearch-data |
| 60 | mountPath: /usr/share/elasticsearch/data |
| 61 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 62 | - name: localtime |
| 63 | hostPath: |
| 64 | path: /etc/localtime |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 65 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 66 | configMap: |
| 67 | name: aai-elasticsearch-configmap |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 68 | - name: elasticsearch-data |
| 69 | hostPath: |
kerenj | b19df80 | 2018-02-25 11:19:53 +0000 | [diff] [blame] | 70 | path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data" |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 71 | imagePullSecrets: |
| 72 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 73 | #{{ end }} |