8a56a5f42083b9dd91be9866814e61e2a647a4b1
[oom.git] / kubernetes / msb / templates / msb-iag-deployment.yaml
1 #{{ if not .Values.disableMsbMsbIag }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: msb-iag
6   namespace: "{{ .Values.nsPrefix }}"
7 spec:
8   replicas: {{ .Values.iagReplicas }}
9   selector:
10     matchLabels:
11       app: msb-iag
12   template:
13     metadata:
14       labels:
15         app: msb-iag
16       name: msb-iag
17     spec:
18       hostname: msb-iag
19       initContainers:
20       - command:
21         - /root/ready.py
22         args:
23         - --container-name
24         - msb-discovery
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: msb-iag-readiness
34       containers:
35       - args:
36         image:  {{ .Values.image.apigateway }}
37         name: "msb-iag"
38         env:
39         - name: CONSUL_IP
40           value: msb-consul.{{ .Values.nsPrefix }}
41         - name: SDCLIENT_IP
42           value: msb-discovery.{{ .Values.nsPrefix }}
43         - name: ROUTE_LABELS
44           value: "visualRange:1"
45         ports:
46         - containerPort: {{ .Values.iagPort }}
47           name: msb-iag
48         readinessProbe:
49           tcpSocket:
50             port: {{ .Values.iagPort }}
51           initialDelaySeconds: 5
52           periodSeconds: 10
53         imagePullPolicy: "{{ .Values.pullPolicy}}"
54       imagePullSecrets:
55       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
56 #{{ end }}