Config seg sdc deployment
[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           subPath: haproxy.cfg
46           name: haproxy-cfg
47         ports:
48         - containerPort: 8080
49         - containerPort: 8443
50         readinessProbe:
51           tcpSocket:
52             port: 8443
53           initialDelaySeconds: 5
54           periodSeconds: 10
55       volumes:
56         - name: localtime
57           hostPath:
58             path: /etc/localtime
59         - name: aai-service-log
60           hostPath:
61             path: "/dev/log"
62         - name: haproxy-cfg
63           configMap:
64             name: aai-deployment-configmap
65       restartPolicy: Always
66       imagePullSecrets:
67       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
68 #{{ end }}