create K8S cluster by TOSCA
[oom.git] / kubernetes / aai / templates / elasticsearch-deployment.yaml
1 #{{ if not .Values.disableAaiElasticsearch }}
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:
17       hostname: elasticsearch
18       containers:
19       - name: elasticsearch
20         image: "{{ .Values.image.elasticsearchImage }}:{{ .Values.image.elasticsearchVersion }}"
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         ports:
23         - containerPort: 9200
24         readinessProbe:
25           tcpSocket:
26             port: 9200
27           initialDelaySeconds: 5
28           periodSeconds: 10
29         volumeMounts:
30         - name: localtime
31           mountPath: /etc/localtime
32           readOnly: true
33         - name: elasticsearch-config
34           mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
35         - name: elasticsearch-data
36           mountPath: /usr/share/elasticsearch/data
37       volumes:
38       - name: localtime
39         hostPath:
40           path: /etc/localtime
41       - name: elasticsearch-config
42         hostPath:
43           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/config/elasticsearch.yml"
44       - name: elasticsearch-data
45         hostPath:
46           path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/elasticsearch/es-data"
47       imagePullSecrets:
48       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
49 #{{ end }}