blob: 75977c7be0ddf8daa8bd2077d0449aaebfe85217 [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disablePortalPortalapps }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: portalapps
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-portal"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
8 selector:
9 matchLabels:
10 app: portalapps
11 template:
12 metadata:
13 labels:
14 app: portalapps
15 name: portalapps
16 annotations:
17 pod.beta.kubernetes.io/init-containers: '[
18 {
19 "args": [
20 "--container-name",
21 "portaldb"
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 ],
kerenjcbac0102017-08-23 10:22:33 +000037 "image": "{{ .Values.image.readiness }}",
38 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040039 "name": "portalapps-readiness"
40 },
41 {
Mandeep Khinda90ec5982017-10-17 18:08:34 +000042 "command": ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -pAa123456 -h portaldb < /portal-mysql/oom_updates.sql; fi"],
Mandeep Khindad6ea9872017-06-24 11:49:37 -040043 "volumeMounts": [
44 {
Mandeep Khinda82c63d32017-08-21 16:04:37 -040045 "mountPath": "/portal-mysql/oom_updates.sql",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040046 "name": "portal-mariadb-onboarding-sql"
47 },
48 {
49 "mountPath": "/portal_root/",
50 "name": "portal-root"
51 }
52 ],
kerenjcbac0102017-08-23 10:22:33 +000053 "image": "{{ .Values.image.mariadbClient }}",
54 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040055 "name": "provision-portaldb-users"
56 }
57 ]'
58 spec:
59 containers:
kerenjcbac0102017-08-23 10:22:33 +000060 - image: {{ .Values.image.portalapps }}
61 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040062 lifecycle:
63 postStart:
64 exec:
65 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
66 name: portalapps
67 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030068 - mountPath: /etc/localtime
69 name: localtime
70 readOnly: true
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000071 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 name: portal-fusion-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000073 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040074 name: portal-openid-connect-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000075 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040076 name: portal-system-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000077 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040078 name: portal-portal-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000079 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000080 name: portal-logback
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000081 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 name: sdkapp-system-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000083 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040084 name: sdkapp-portal-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000085 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040086 name: sdkapp-fusion-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000087 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
88 name: sdkapp-logback
Mandeep Khindad6ea9872017-06-24 11:49:37 -040089 - mountPath: /portal_root/
90 name: portal-root
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000091 - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040092 name: portal-logs
yurynd0707be2017-09-27 14:54:18 +030093 - mountPath: /var/log/onap
94 name: portal-logs2
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
yurynd0707be2017-09-27 14:54:18 +0300104 - image: {{ .Values.image.filebeat }}
105 imagePullPolicy: {{ .Values.pullPolicy }}
106 name: filebeat-onap
107 volumeMounts:
108 - mountPath: /usr/share/filebeat/filebeat.yml
109 name: filebeat-conf
110 - mountPath: /var/log/onap
111 name: portal-logs2
112 - mountPath: /usr/share/filebeat/data
113 name: portal-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400114 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300115 - name: localtime
116 hostPath:
117 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300118 - name: filebeat-conf
119 hostPath:
120 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
121 - name: portal-logs2
122 emptyDir: {}
123 - name: portal-data-filebeat
124 emptyDir: {}
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400125 - name: portal-fusion-properties
126 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000127 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400128 - name: portal-openid-connect-properties
129 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000130 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400131 - name: portal-system-properties
132 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000133 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400134 - name: portal-portal-properties
135 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000136 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/portal.properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000137 - name: portal-logback
138 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000139 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportal/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400140 - name: sdkapp-system-properties
141 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000142 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400143 - name: sdkapp-portal-properties
144 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000145 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400146 - name: sdkapp-fusion-properties
147 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000148 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties
149 - name: sdkapp-logback
150 hostPath:
151 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportalsdk/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400152 - name: portal-mariadb-onboarding-sql
153 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000154 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400155 - name: portal-root
156 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000157 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400158 - name: portal-logs
159 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000160 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300161 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000162 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +0300163#{{ end }}