blob: 761441acc38b0ae34fb0da9ea6360225eb480bd8 [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
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016 spec:
vasundhra6f620442017-11-22 12:26:25 +000017 initContainers:
18 - command:
19 - /root/ready.py
20 args:
21 - --container-name
22 - portaldb
23 env:
24 - name: NAMESPACE
25 valueFrom:
26 fieldRef:
27 apiVersion: v1
28 fieldPath: metadata.namespace
29 image: {{ .Values.image.readiness }}
30 imagePullPolicy: {{ .Values.pullPolicy }}
31 name: portalapps-readiness
32 - command: ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -pAa123456 -h portaldb < /portal-mysql/oom_updates.sql; fi"]
33 volumeMounts:
34 - mountPath: /portal-mysql/oom_updates.sql
35 name: portal-mariadb-onboarding-sql
36 - mountPath: /portal_root/
37 name: portal-root
38 image: {{ .Values.image.mariadbClient }}
39 imagePullPolicy: {{ .Values.pullPolicy }}
40 name: provision-portaldb-users
Mandeep Khindad6ea9872017-06-24 11:49:37 -040041 containers:
kerenjcbac0102017-08-23 10:22:33 +000042 - image: {{ .Values.image.portalapps }}
43 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040044 lifecycle:
45 postStart:
46 exec:
47 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
48 name: portalapps
49 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030050 - mountPath: /etc/localtime
51 name: localtime
52 readOnly: true
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000053 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040054 name: portal-fusion-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000055 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040056 name: portal-openid-connect-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000057 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040058 name: portal-system-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000059 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040060 name: portal-portal-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000061 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000062 name: portal-logback
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000063 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040064 name: sdkapp-system-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000065 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040066 name: sdkapp-portal-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000067 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040068 name: sdkapp-fusion-properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000069 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
70 name: sdkapp-logback
Mandeep Khindad6ea9872017-06-24 11:49:37 -040071 - mountPath: /portal_root/
72 name: portal-root
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000073 - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040074 name: portal-logs
yurynd0707be2017-09-27 14:54:18 +030075 - mountPath: /var/log/onap
76 name: portal-logs2
Mandeep Khindad6ea9872017-06-24 11:49:37 -040077 ports:
78 - containerPort: 8005
79 - containerPort: 8009
80 - containerPort: 8080
81 readinessProbe:
82 tcpSocket:
83 port: 8080
84 initialDelaySeconds: 5
85 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +030086 - image: {{ .Values.image.filebeat }}
87 imagePullPolicy: {{ .Values.pullPolicy }}
88 name: filebeat-onap
89 volumeMounts:
90 - mountPath: /usr/share/filebeat/filebeat.yml
91 name: filebeat-conf
92 - mountPath: /var/log/onap
93 name: portal-logs2
94 - mountPath: /usr/share/filebeat/data
95 name: portal-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -040096 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030097 - name: localtime
98 hostPath:
99 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300100 - name: filebeat-conf
101 hostPath:
102 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
103 - name: portal-logs2
104 emptyDir: {}
105 - name: portal-data-filebeat
106 emptyDir: {}
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400107 - name: portal-fusion-properties
108 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000109 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400110 - name: portal-openid-connect-properties
111 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000112 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400113 - name: portal-system-properties
114 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000115 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400116 - name: portal-portal-properties
117 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000118 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/portal.properties
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000119 - name: portal-logback
120 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000121 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportal/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400122 - name: sdkapp-system-properties
123 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000124 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400125 - name: sdkapp-portal-properties
126 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000127 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400128 - name: sdkapp-fusion-properties
129 hostPath:
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000130 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties
131 - name: sdkapp-logback
132 hostPath:
133 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportalsdk/logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400134 - name: portal-mariadb-onboarding-sql
135 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000136 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400137 - name: portal-root
138 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000139 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400140 - name: portal-logs
141 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000142 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300143 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000144 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000145#{{ end }}