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