License addition in all yamls
[oom.git] / kubernetes / aai / templates / aai-deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 #{{ if not .Values.disableAaiAaiService }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: aai-service
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.aaiServiceReplicas }}
23   selector:
24     matchLabels:
25       app: aai-service
26   template:
27     metadata:
28       labels:
29         app: aai-service
30       name: aai-service
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - aai-resources
38         - --container-name
39         - aai-traversal
40         env:
41         - name: NAMESPACE
42           valueFrom:
43             fieldRef:
44               apiVersion: v1
45               fieldPath: metadata.namespace
46         image: {{ .Values.image.readiness }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         name: aai-service-readiness
49       containers:
50       - name: aai-service
51         image: "{{ .Values.image.aaiProxy }}:{{ .Values.image.aaiProxyVersion}}"
52         imagePullPolicy: {{ .Values.pullPolicy }}
53         volumeMounts:
54         - mountPath: /etc/localtime
55           name: localtime
56           readOnly: true
57         - mountPath: /dev/log
58           name: aai-service-log
59         - mountPath: /usr/local/etc/haproxy/haproxy.cfg
60           subPath: haproxy.cfg
61           name: haproxy-cfg
62         ports:
63         - containerPort: 8080
64         - containerPort: 8443
65         readinessProbe:
66           tcpSocket:
67             port: 8443
68           initialDelaySeconds: 5
69           periodSeconds: 10
70       volumes:
71         - name: localtime
72           hostPath:
73             path: /etc/localtime
74         - name: aai-service-log
75           hostPath:
76             path: "/dev/log"
77         - name: haproxy-cfg
78           configMap:
79             name: aai-deployment-configmap
80       restartPolicy: Always
81       imagePullSecrets:
82       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
83 #{{ end }}