Add K8S deployment above Vagrant
[sdc.git] / sdc-os-chef / kubernetes / sdc / templates / deployments / 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 }}-sdc"
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       containers:
20       - image: {{ .Values.image.sdcElasticsearch }}
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         name: sdc-es
23         env:
24         - name: ENVNAME
25           value: "AUTO"
26         - name: HOST_IP
27           valueFrom:
28             fieldRef:
29               fieldPath: status.podIP
30         - name: ES_HEAP_SIZE
31           value: "1024M"
32         volumeMounts:
33         - mountPath: /root/chef-solo/environments/
34           name: sdc-environments
35         - mountPath: /etc/localtime
36           name: sdc-localtime
37           readOnly: true
38         - mountPath: /var/lib/jetty/logs
39           name: sdc-logs
40         ports:
41         - containerPort: 9200
42         - containerPort: 9300
43         readinessProbe:
44           httpGet:
45             path: "_cluster/health?wait_for_status=yellow&timeout=120s"
46             port: 9200
47             scheme: HTTP
48           initialDelaySeconds: 60
49           timeoutSeconds: 5
50           periodSeconds: 5
51       volumes:
52       - name: sdc-environments
53         configMap:
54           name: sdc-environment
55       - name: sdc-localtime
56         hostPath:
57           path:  /etc/localtime
58       - name:  sdc-logs
59         hostPath:
60           path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
61       imagePullSecrets:
62       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
63 #{{ end }}