blob: 902f31ef6088890458f8f580ed45360b5bd9881d [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# 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
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disableAaiElasticsearch }}
Mandeep Khinda4b881972017-08-30 14:24:02 +000016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +000019 name: aai-elasticsearch
20 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khinda4b881972017-08-30 14:24:02 +000021spec:
vaibhav_16deca97d3fd2018-02-14 05:32:10 +000022 replicas: {{ .Values.elasticsearchReplicas }}
Mandeep Khinda4b881972017-08-30 14:24:02 +000023 selector:
24 matchLabels:
BorislavG8bfc6cf2018-02-27 15:04:26 +000025 app: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000026 template:
27 metadata:
28 labels:
BorislavG8bfc6cf2018-02-27 15:04:26 +000029 app: aai-elasticsearch
30 name: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000031 spec:
mayankg27034e6c9332018-02-05 17:18:18 +000032 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/
BorislavG8bfc6cf2018-02-27 15:04:26 +000054 hostname: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000055 containers:
BorislavG8bfc6cf2018-02-27 15:04:26 +000056 - name: aai-elasticsearch
Mandeep Khinda4b881972017-08-30 14:24:02 +000057 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:
yuryn8b3bc5a2017-09-13 19:21:03 +030067 - name: localtime
68 mountPath: /etc/localtime
69 readOnly: true
Mandeep Khinda4b881972017-08-30 14:24:02 +000070 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000071 subPath: elasticsearch.yml
Mandeep Khinda4b881972017-08-30 14:24:02 +000072 mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
73 - name: elasticsearch-data
74 mountPath: /usr/share/elasticsearch/data
75 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030076 - name: localtime
77 hostPath:
78 path: /etc/localtime
Mandeep Khinda4b881972017-08-30 14:24:02 +000079 - name: elasticsearch-config
mayankg27034e6c9332018-02-05 17:18:18 +000080 configMap:
81 name: aai-elasticsearch-configmap
Mandeep Khinda4b881972017-08-30 14:24:02 +000082 - name: elasticsearch-data
83 hostPath:
kerenjb19df802018-02-25 11:19:53 +000084 path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/data"
Mandeep Khinda4b881972017-08-30 14:24:02 +000085 imagePullSecrets:
86 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
mayankg27034e6c9332018-02-05 17:18:18 +000087#{{ end }}