979c70df5b48bc73d4c588110fe988f404315d27
[oom.git] / kubernetes / sdc / templates / sdc-es.yaml
1 #{{ if not .Values.disableSdcSdcEs }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: sdc-es
7   name: sdc-es
8   namespace: "{{ .Values.nsPrefix }}"
9 spec:
10   selector:
11     matchLabels:
12       app: sdc-es
13   template:
14     metadata:
15       labels:
16         app: sdc-es
17       name: sdc-es
18     spec:
19       initContainers:
20       - name: sdc-logs-init
21         image: {{ .Values.image.ubuntuInit }}
22         imagePullPolicy: {{ .Values.pullPolicy }}
23         command:
24         - /bin/bash
25         - "-c"
26         - |
27           mkdir -p /ubuntu-init/ASDC/ASDC-ES/
28           mkdir -p /ubuntu-init/ASDC/ASDC-CS/
29           mkdir -p /ubuntu-init/ASDC/ASDC-KB/
30           mkdir -p /ubuntu-init/ASDC/ASDC-BE/
31           mkdir -p /ubuntu-init/ASDC/ASDC-FE/
32           chmod -R 777 /ubuntu-init/
33       containers:
34       - image: {{ .Values.image.sdcElasticsearch }}
35         imagePullPolicy: {{ .Values.pullPolicy }}
36         name: sdc-es
37         env:
38         - name: ENVNAME
39           value: "AUTO"
40         - name: HOST_IP
41           valueFrom:
42             fieldRef:
43               fieldPath: status.podIP
44         - name: ES_HEAP_SIZE
45           value: "1024M"
46         volumeMounts:
47         - name: sdc-logs
48           mountPath: /ubuntu-init/
49         - mountPath: /root/chef-solo/environments/
50           name: sdc-environments
51         - mountPath: /etc/localtime
52           name: sdc-localtime
53           readOnly: true
54         - mountPath: /var/lib/jetty/logs
55           name: sdc-logs
56         ports:
57         - containerPort: 9200
58         - containerPort: 9300
59         readinessProbe:
60           tcpSocket:
61             port: 9200
62           initialDelaySeconds: 5
63           periodSeconds: 10
64       volumes:
65         - name: sdc-environments
66           configMap :
67             name : sdc-environments-configmap
68             defaultMode: 0755
69         - name: sdc-localtime
70           hostPath:
71             path:  /etc/localtime
72         - name:  sdc-logs
73           hostPath:
74             path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
75       imagePullSecrets:
76       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
77 #{{ end }}