94149902018178316957298ab2098d71051a8bd5
[oom.git] / kubernetes / mso / templates / mso-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: mso
5   namespace: "{{ .Values.nsPrefix }}-mso"
6 spec:
7   replicas: 1
8   selector:
9     matchLabels:
10       app: mso
11   template:
12     metadata:
13       labels:
14         app: mso
15       name: mso
16       annotations:
17         pod.beta.kubernetes.io/init-containers: '[
18           {
19               "args": [
20                   "--container-name",
21                   "mariadb"
22               ],
23               "command": [
24                   "/root/ready.py"
25               ],
26               "env": [
27                   {
28                       "name": "NAMESPACE",
29                       "valueFrom": {
30                           "fieldRef": {
31                               "apiVersion": "v1",
32                               "fieldPath": "metadata.namespace"
33                           }
34                       }
35                   }
36               ],
37               "image": "{{ .Values.image.readiness }}",
38               "imagePullPolicy": "{{ .Values.pullPolicy }}",
39               "name": "mso-readiness"
40           }
41           ]'
42     spec:
43       containers:
44       - command:
45         - /docker-files/scripts/start-jboss-server.sh
46         image: {{ .Values.image.mso }}
47         imagePullPolicy: {{ .Values.pullPolicy }}
48         name: mso
49         volumeMounts:
50         - mountPath: /shared
51           name: mso
52         - mountPath: /shared/aai.crt
53           name: mso-aai-crt
54         - mountPath: /shared/encryption.key
55           name: mso-key
56         - mountPath: /docker-files
57           name: mso-docker-files
58         env:
59         - name: JBOSS_DEBUG
60           value: "false"
61         ports:
62         - containerPort: 3904
63         - containerPort: 3905
64         - containerPort: 8080
65         - containerPort: 9990
66         - containerPort: 8787
67         readinessProbe:
68           tcpSocket:
69             port: 8080
70           initialDelaySeconds: 5
71           periodSeconds: 10
72       volumes:
73         - name: mso
74           hostPath:
75             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mso
76         - name: mso-docker-files
77           hostPath:
78             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/docker-files
79         - name: mso-aai-crt
80           secret:
81             secretName: secret-{{ .Values.nsPrefix }}-mso
82         - name: mso-key
83           secret:
84             secretName: secret-{{ .Values.nsPrefix }}-mso
85       imagePullSecrets:
86       - name: "{{ .Values.nsPrefix }}-docker-registry-key"