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: |
| 5 | name: elasticsearch |
| 6 | namespace: "{{ .Values.nsPrefix }}-aai" |
| 7 | spec: |
| 8 | selector: |
| 9 | matchLabels: |
| 10 | app: elasticsearch |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: elasticsearch |
| 15 | name: elasticsearch |
| 16 | spec: |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame^] | 17 | 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 Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 39 | 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: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 52 | - name: localtime |
| 53 | mountPath: /etc/localtime |
| 54 | readOnly: true |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 55 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame^] | 56 | subPath: elasticsearch.yml |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 57 | mountPath: /usr/share/elasticsearch/config/elasticsearch.yml |
| 58 | - name: elasticsearch-data |
| 59 | mountPath: /usr/share/elasticsearch/data |
| 60 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 61 | - name: localtime |
| 62 | hostPath: |
| 63 | path: /etc/localtime |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 64 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame^] | 65 | configMap: |
| 66 | name: aai-elasticsearch-configmap |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 67 | - name: elasticsearch-data |
| 68 | hostPath: |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame^] | 69 | path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/" |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 70 | imagePullSecrets: |
| 71 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame^] | 72 | #{{ end }} |