Add option to disable specific deployments
[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       annotations:
17         pod.beta.kubernetes.io/init-containers: '[{
18             "args": [
19                 "--container-name", "aai-resources",
20                 "--container-name", "aai-traversal"
21             ],
22             "command": [
23                 "/root/ready.py"
24             ],
25             "env": [{
26                 "name": "NAMESPACE",
27                 "valueFrom": {
28                     "fieldRef": {
29                         "apiVersion": "v1",
30                         "fieldPath": "metadata.namespace"
31                     }
32                 }
33             }],
34             "image": "{{ .Values.image.readiness }}",
35             "imagePullPolicy": "{{ .Values.pullPolicy }}",
36             "name": "aai-service-readiness"
37           }]'
38     spec:
39       containers:
40       - name: aai-service
41         image: "{{ .Values.image.aaiProxy }}:{{ .Values.image.aaiProxyVersion}}"
42         imagePullPolicy: {{ .Values.pullPolicy }}
43         volumeMounts:
44         - mountPath: /etc/localtime
45           name: localtime
46           readOnly: true
47         - mountPath: /dev/log
48           name: aai-service-log
49         - mountPath: /usr/local/etc/haproxy/haproxy.cfg
50           name: haproxy-cfg
51         ports:
52         - containerPort: 8080
53         - containerPort: 8443
54         readinessProbe:
55           tcpSocket:
56             port: 8443
57           initialDelaySeconds: 5
58           periodSeconds: 10
59       volumes:
60         - name: localtime
61           hostPath:
62             path: /etc/localtime
63         - name: aai-service-log
64           hostPath:
65             path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/log/"
66         - name: haproxy-cfg
67           hostPath:
68             path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/haproxy/haproxy.cfg"
69       restartPolicy: Always
70       imagePullSecrets:
71       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
72 #{{ end }}