5b020e586597096bdabbe10f6b452358ea14c175
[oom.git] / kubernetes / portal / templates / portal-widgets-deployment.yaml
1 apiVersion: extensions/v1beta1
2 kind: Deployment
3 metadata:
4   name: portalwidgets
5   namespace: "{{ .Values.nsPrefix }}-portal"
6 spec:
7   selector:
8     matchLabels:
9       app: portalwidgets
10   template:
11     metadata:
12        labels:
13          app: portalwidgets
14        name: portalwidgets
15        annotations:
16          pod.beta.kubernetes.io/init-containers: '[
17            {
18                "args": [
19                    "--container-name",
20                    "portaldb"
21                ],
22                "command": [
23                    "/root/ready.py"
24                ],
25                "env": [
26                    {
27                        "name": "NAMESPACE",
28                        "valueFrom": {
29                            "fieldRef": {
30                                "apiVersion": "v1",
31                                "fieldPath": "metadata.namespace"
32                            }
33                        }
34                    }
35                ],
36                "image": "{{ .Values.image.readiness }}",
37                "imagePullPolicy": "{{ .Values.pullPolicy }}",
38                "name": "portalapps-readiness"
39            }
40            ]'
41     spec:
42       containers:
43       - image: {{ .Values.image.portalwms }}
44         imagePullPolicy: {{ .Values.pullPolicy }} 
45         name: portalwidgets
46         volumeMounts:
47         - mountPath: /application.properties
48           name: portalwidgets-application-properties
49         ports:
50         - containerPort: 8082
51         readinessProbe:
52           tcpSocket:
53             port: 8082
54           initialDelaySeconds: 5
55           periodSeconds: 10
56       volumes:
57         - name: portalwidgets-application-properties
58           hostPath:
59             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPWIDGETMS/application.properties
60       imagePullSecrets:
61       - name: "{{ .Values.nsPrefix }}-docker-registry-key"