blob: a0818fab1b9d76b76ff9f01c8af7cad0f23dd967 [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 Khinda82c63d32017-08-21 16:04:37 -040067 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 name: portal-fusion-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040069 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040070 name: portal-openid-connect-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040071 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/conf/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040072 name: portal-system-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040073 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/classes/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040074 name: portal-portal-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040075 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040076 name: dbcapp-fusion-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040077 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/conf/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040078 name: dbcapp-system-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040079 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/classes/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040080 name: dbcapp-portal-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040081 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040082 name: dbcapp-dbcapp-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040083 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/conf/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040084 name: sdkapp-system-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040085 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/classes/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040086 name: sdkapp-portal-properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -040087 - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties
88 name: sdkapp-fusion-properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -040089 - mountPath: /portal_root/
90 name: portal-root
Mandeep Khinda82c63d32017-08-21 16:04:37 -040091 - mountPath: /opt/apache-tomcat-8.0.37/logs
92 name: portal-logs
Mandeep Khindad6ea9872017-06-24 11:49:37 -040093 ports:
94 - containerPort: 8005
95 - containerPort: 8009
96 - containerPort: 8080
97 readinessProbe:
98 tcpSocket:
99 port: 8080
100 initialDelaySeconds: 5
101 periodSeconds: 10
102 volumes:
103 - name: portal-fusion-properties
104 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000105 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400106 - name: portal-openid-connect-properties
107 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000108 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/openid-connect.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400109 - name: portal-system-properties
110 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000111 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400112 - name: portal-portal-properties
113 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000114 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400115 - name: dbcapp-fusion-properties
116 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000117 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400118 - name: dbcapp-system-properties
119 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000120 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400121 - name: dbcapp-portal-properties
122 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000123 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/portal.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400124 - name: dbcapp-dbcapp-properties
125 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000126 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/dbcapp.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400127 - name: sdkapp-system-properties
128 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000129 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/system.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400130 - name: sdkapp-portal-properties
131 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000132 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400133 - name: sdkapp-fusion-properties
134 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000135 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400136 - name: portal-mariadb-onboarding-sql
137 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000138 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400139 - name: portal-root
140 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000141 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400142 - name: portal-logs
143 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000144 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300145 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000146 - name: "{{ .Values.nsPrefix }}-docker-registry-key"