blob: c6078678cd8041500264263594694a3c7fbd61aa [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: portalapps
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00005 namespace: "{{ .Values.nsPrefix }}-portal"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04006spec:
7 selector:
8 matchLabels:
9 app: portalapps
10 template:
11 metadata:
12 labels:
13 app: portalapps
14 name: portalapps
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 ],
kerenjcbac0102017-08-23 10:22:33 +000036 "image": "{{ .Values.image.readiness }}",
37 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040038 "name": "portalapps-readiness"
39 },
40 {
Mandeep Khinda82c63d32017-08-21 16:04:37 -040041 "command": ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -ppassword -h portaldb < /portal-mysql/oom_updates.sql; fi"],
Mandeep Khindad6ea9872017-06-24 11:49:37 -040042 "volumeMounts": [
43 {
Mandeep Khinda82c63d32017-08-21 16:04:37 -040044 "mountPath": "/portal-mysql/oom_updates.sql",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040045 "name": "portal-mariadb-onboarding-sql"
46 },
47 {
48 "mountPath": "/portal_root/",
49 "name": "portal-root"
50 }
51 ],
kerenjcbac0102017-08-23 10:22:33 +000052 "image": "{{ .Values.image.mariadbClient }}",
53 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 "name": "provision-portaldb-users"
55 }
56 ]'
57 spec:
58 containers:
kerenjcbac0102017-08-23 10:22:33 +000059 - image: {{ .Values.image.portalapps }}
60 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040061 lifecycle:
62 postStart:
63 exec:
64 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
65 name: portalapps
66 volumeMounts:
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000067 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 name: portal-fusion-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000069 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040070 name: portal-openid-connect-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000071 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 name: portal-system-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000073 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040074 name: portal-portal-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000075 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/logback.xml"
76 name: portal-logback
77 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040078 name: dbcapp-fusion-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000079 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040080 name: dbcapp-system-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000081 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 name: dbcapp-portal-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000083 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040084 name: dbcapp-dbcapp-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000085 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040086 name: sdkapp-system-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000087 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040088 name: sdkapp-portal-properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000089 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040090 name: sdkapp-fusion-properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040091 - mountPath: /portal_root/
92 name: portal-root
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000093 - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040094 name: portal-logs
Mandeep Khindad6ea9872017-06-24 11:49:37 -040095 ports:
96 - containerPort: 8005
97 - containerPort: 8009
98 - containerPort: 8080
99 readinessProbe:
100 tcpSocket:
101 port: 8080
102 initialDelaySeconds: 5
103 periodSeconds: 10
104 volumes:
105 - name: portal-fusion-properties
106 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000107 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400108 - name: portal-openid-connect-properties
109 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000110 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/openid-connect.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400111 - name: portal-system-properties
112 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000113 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400114 - name: portal-portal-properties
115 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000116 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/portal.properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000117 - name: portal-logback
118 hostPath:
119 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400120 - name: dbcapp-fusion-properties
121 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000122 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400123 - name: dbcapp-system-properties
124 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000125 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400126 - name: dbcapp-portal-properties
127 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000128 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400129 - name: dbcapp-dbcapp-properties
130 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000131 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/dbcapp.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400132 - name: sdkapp-system-properties
133 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000134 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400135 - name: sdkapp-portal-properties
136 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000137 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400138 - name: sdkapp-fusion-properties
139 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000140 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400141 - name: portal-mariadb-onboarding-sql
142 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000143 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400144 - name: portal-root
145 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000146 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400147 - name: portal-logs
148 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000149 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300150 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000151 - name: "{{ .Values.nsPrefix }}-docker-registry-key"