vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, Bell Canada |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disableAaiElasticsearch }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 19 | name: aai-elasticsearch |
| 20 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 21 | spec: |
vaibhav_16dec | a97d3fd | 2018-02-14 05:32:10 +0000 | [diff] [blame] | 22 | replicas: {{ .Values.elasticsearchReplicas }} |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 23 | selector: |
| 24 | matchLabels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 25 | app: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 26 | template: |
| 27 | metadata: |
| 28 | labels: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 29 | app: aai-elasticsearch |
| 30 | name: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 31 | spec: |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 32 | initContainers: |
| 33 | - command: |
| 34 | - /bin/sh |
| 35 | - -c |
| 36 | - | |
| 37 | mkdir -p /logroot/elasticsearch/es-data |
| 38 | chmod -R 777 /logroot/elasticsearch/es-data |
| 39 | chown -R root:root /logroot |
| 40 | env: |
| 41 | - name: NAMESPACE |
| 42 | valueFrom: |
| 43 | fieldRef: |
| 44 | apiVersion: v1 |
| 45 | fieldPath: metadata.namespace |
| 46 | securityContext: |
| 47 | privileged: true |
| 48 | image: {{ .Values.image.es_bb }} |
| 49 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 50 | name: init-sysctl |
| 51 | volumeMounts: |
| 52 | - name: elasticsearch-data |
| 53 | mountPath: /logroot/ |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 54 | hostname: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 55 | containers: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 56 | - name: aai-elasticsearch |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 57 | image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}" |
| 58 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 59 | ports: |
| 60 | - containerPort: 9200 |
| 61 | readinessProbe: |
| 62 | tcpSocket: |
| 63 | port: 9200 |
| 64 | initialDelaySeconds: 5 |
| 65 | periodSeconds: 10 |
| 66 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 67 | - name: localtime |
| 68 | mountPath: /etc/localtime |
| 69 | readOnly: true |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 70 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 71 | subPath: elasticsearch.yml |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 72 | mountPath: /usr/share/elasticsearch/config/elasticsearch.yml |
| 73 | - name: elasticsearch-data |
| 74 | mountPath: /usr/share/elasticsearch/data |
| 75 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 76 | - name: localtime |
| 77 | hostPath: |
| 78 | path: /etc/localtime |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 79 | - name: elasticsearch-config |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 80 | configMap: |
| 81 | name: aai-elasticsearch-configmap |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 82 | - name: elasticsearch-data |
| 83 | hostPath: |
kerenj | b19df80 | 2018-02-25 11:19:53 +0000 | [diff] [blame] | 84 | path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data" |
Mandeep Khinda | 4b88197 | 2017-08-30 14:24:02 +0000 | [diff] [blame] | 85 | imagePullSecrets: |
| 86 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
mayankg2703 | 4e6c933 | 2018-02-05 17:18:18 +0000 | [diff] [blame] | 87 | #{{ end }} |