blob: b45cec4946b850c3da08cf87a2208b9c29202095 [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
mayankc8f632c2018-01-21 10:08:25 +000036 subPath: oom_updates.sql
vasundhra6f620442017-11-22 12:26:25 +000037 - mountPath: /portal_root/
38 name: portal-root
39 image: {{ .Values.image.mariadbClient }}
40 imagePullPolicy: {{ .Values.pullPolicy }}
41 name: provision-portaldb-users
mayankc8f632c2018-01-21 10:08:25 +000042 - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"]
43 volumeMounts:
44 - name: portal-logs
45 mountPath: /ubuntu-init/
46 image: {{ .Values.image.ubuntuInit }}
47 imagePullPolicy: {{ .Values.pullPolicy }}
48 name: portal-app-logs-init
Mandeep Khindad6ea9872017-06-24 11:49:37 -040049 containers:
kerenjcbac0102017-08-23 10:22:33 +000050 - image: {{ .Values.image.portalapps }}
51 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040052 lifecycle:
53 postStart:
54 exec:
55 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
56 name: portalapps
57 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030058 - mountPath: /etc/localtime
59 name: localtime
60 readOnly: true
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000061 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000062 name: onap-portal-properties
63 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000064 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
mayankc8f632c2018-01-21 10:08:25 +000065 name: onap-portal-properties
66 subPath: openid-connect.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000067 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000068 name: onap-portal-properties
69 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000070 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000071 name: onap-portal-properties
72 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000073 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000074 name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +000075 subPath: logback.xml
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000076 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000077 name: portal-sdkapp-properties
78 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000079 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000080 name: portal-sdkapp-properties
81 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000082 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000083 name: portal-sdkapp-properties
84 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000085 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
86 name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +000087 subPath: logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -040088 - mountPath: /portal_root/
89 name: portal-root
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000090 - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
Mandeep Khinda82c63d32017-08-21 16:04:37 -040091 name: portal-logs
yurynd0707be2017-09-27 14:54:18 +030092 - mountPath: /var/log/onap
93 name: portal-logs2
Mandeep Khindad6ea9872017-06-24 11:49:37 -040094 ports:
95 - containerPort: 8005
96 - containerPort: 8009
97 - containerPort: 8080
98 readinessProbe:
99 tcpSocket:
100 port: 8080
101 initialDelaySeconds: 5
102 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +0300103 - image: {{ .Values.image.filebeat }}
104 imagePullPolicy: {{ .Values.pullPolicy }}
105 name: filebeat-onap
106 volumeMounts:
107 - mountPath: /usr/share/filebeat/filebeat.yml
108 name: filebeat-conf
mayankc8f632c2018-01-21 10:08:25 +0000109 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300110 - 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
mayankc8f632c2018-01-21 10:08:25 +0000119 configMap:
120 name: portal-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300121 - name: portal-logs2
122 emptyDir: {}
123 - name: portal-data-filebeat
124 emptyDir: {}
mayankc8f632c2018-01-21 10:08:25 +0000125 - name: onap-portal-properties
126 configMap:
127 defaultMode: 0755
128 name: portal-onap-portal-configmap
129 - name: portal-sdkapp-properties
130 configMap:
131 defaultMode: 0755
132 name: portal-onap-portal-sdk-configmap
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000133 - name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +0000134 configMap:
135 name: portal-onapportal-log-configmap
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000136 - name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +0000137 configMap:
138 name: portal-onapportalsdk-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400139 - name: portal-mariadb-onboarding-sql
mayankc8f632c2018-01-21 10:08:25 +0000140 configMap:
141 name: portal-mariadb-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400142 - name: portal-root
143 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000144 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400145 - name: portal-logs
146 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000147 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300148 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000149 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000150#{{ end }}