Merge "Update annotations to spec for aai"
[oom.git] / kubernetes / aai / templates / aai-deployment.yaml
1 #{{ if not .Values.disableAaiAaiService }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: aai-service
6   namespace: "{{ .Values.nsPrefix }}-aai"
7 spec:
8   selector:
9     matchLabels:
10       app: aai-service
11   template:
12     metadata:
13       labels:
14         app: aai-service
15       name: aai-service
16     spec:
17       initContainers:
18       - command:
19         - /root/ready.py
20         args:
21         - --container-name
22         - aai-resources
23         - --container-name
24         - aai-traversal
25         env:
26         - name: NAMESPACE
27           valueFrom:
28             fieldRef:
29               apiVersion: v1
30               fieldPath: metadata.namespace
31         image: {{ .Values.image.readiness }}
32         imagePullPolicy: {{ .Values.pullPolicy }}
33         name: aai-service-readiness
34       containers:
35       - name: aai-service
36         image: "{{ .Values.image.aaiProxy }}:{{ .Values.image.aaiProxyVersion}}"
37         imagePullPolicy: {{ .Values.pullPolicy }}
38         volumeMounts:
39         - mountPath: /etc/localtime
40           name: localtime
41           readOnly: true
42         - mountPath: /dev/log
43           name: aai-service-log
44         - mountPath: /usr/local/etc/haproxy/haproxy.cfg
45           name: haproxy-cfg
46         ports:
47         - containerPort: 8080
48         - containerPort: 8443
49         readinessProbe:
50           tcpSocket:
51             port: 8443
52           initialDelaySeconds: 5
53           periodSeconds: 10
54       volumes:
55         - name: localtime
56           hostPath:
57             path: /etc/localtime
58         - name: aai-service-log
59           hostPath:
60             path: "/dev/log"
61         - name: haproxy-cfg
62           hostPath:
63             path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/haproxy.cfg"
64       restartPolicy: Always
65       imagePullSecrets:
66       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
67 #{{ end }}