blob: e00151c714fb737f9307315c8f88094331fb7127 [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:
BorislavG8bfc6cf2018-02-27 15:04:26 +00005 name: portal-apps
6 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
vaibhav_16dec49302052018-02-15 10:00:06 +00008 replicas: {{ .Values.portalAppsReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04009 selector:
10 matchLabels:
11 app: portalapps
12 template:
13 metadata:
14 labels:
15 app: portalapps
BorislavG8bfc6cf2018-02-27 15:04:26 +000016 name: portal-apps
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017 spec:
vasundhra6f620442017-11-22 12:26:25 +000018 initContainers:
19 - command:
20 - /root/ready.py
21 args:
22 - --container-name
23 - portaldb
24 env:
25 - name: NAMESPACE
26 valueFrom:
27 fieldRef:
28 apiVersion: v1
29 fieldPath: metadata.namespace
30 image: {{ .Values.image.readiness }}
31 imagePullPolicy: {{ .Values.pullPolicy }}
32 name: portalapps-readiness
33 - command: ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -pAa123456 -h portaldb < /portal-mysql/oom_updates.sql; fi"]
34 volumeMounts:
35 - mountPath: /portal-mysql/oom_updates.sql
36 name: portal-mariadb-onboarding-sql
mayankc8f632c2018-01-21 10:08:25 +000037 subPath: oom_updates.sql
vasundhra6f620442017-11-22 12:26:25 +000038 - mountPath: /portal_root/
39 name: portal-root
40 image: {{ .Values.image.mariadbClient }}
41 imagePullPolicy: {{ .Values.pullPolicy }}
42 name: provision-portaldb-users
mayankc8f632c2018-01-21 10:08:25 +000043 - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"]
44 volumeMounts:
45 - name: portal-logs
46 mountPath: /ubuntu-init/
47 image: {{ .Values.image.ubuntuInit }}
48 imagePullPolicy: {{ .Values.pullPolicy }}
49 name: portal-app-logs-init
Mandeep Khindad6ea9872017-06-24 11:49:37 -040050 containers:
kerenjcbac0102017-08-23 10:22:33 +000051 - image: {{ .Values.image.portalapps }}
52 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040053 lifecycle:
54 postStart:
55 exec:
56 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
57 name: portalapps
58 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030059 - mountPath: /etc/localtime
60 name: localtime
61 readOnly: true
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000062 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000063 name: onap-portal-properties
64 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000065 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
mayankc8f632c2018-01-21 10:08:25 +000066 name: onap-portal-properties
67 subPath: openid-connect.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000068 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000069 name: onap-portal-properties
70 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000071 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000072 name: onap-portal-properties
73 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000074 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000075 name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +000076 subPath: logback.xml
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000077 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000078 name: portal-sdkapp-properties
79 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000080 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000081 name: portal-sdkapp-properties
82 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000083 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000084 name: portal-sdkapp-properties
85 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000086 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
87 name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +000088 subPath: logback.xml
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
mayankc8f632c2018-01-21 10:08:25 +0000110 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300111 - mountPath: /var/log/onap
112 name: portal-logs2
113 - mountPath: /usr/share/filebeat/data
114 name: portal-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400115 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300116 - name: localtime
117 hostPath:
118 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300119 - name: filebeat-conf
mayankc8f632c2018-01-21 10:08:25 +0000120 configMap:
121 name: portal-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300122 - name: portal-logs2
123 emptyDir: {}
124 - name: portal-data-filebeat
125 emptyDir: {}
mayankc8f632c2018-01-21 10:08:25 +0000126 - name: onap-portal-properties
127 configMap:
128 defaultMode: 0755
129 name: portal-onap-portal-configmap
130 - name: portal-sdkapp-properties
131 configMap:
132 defaultMode: 0755
133 name: portal-onap-portal-sdk-configmap
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000134 - name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +0000135 configMap:
136 name: portal-onapportal-log-configmap
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000137 - name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +0000138 configMap:
139 name: portal-onapportalsdk-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400140 - name: portal-mariadb-onboarding-sql
mayankc8f632c2018-01-21 10:08:25 +0000141 configMap:
142 name: portal-mariadb-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400143 - name: portal-root
144 hostPath:
kerenj2dabc182018-02-25 08:12:21 +0000145 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400146 - name: portal-logs
147 hostPath:
kerenj2dabc182018-02-25 08:12:21 +0000148 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300149 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000150 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000151#{{ end }}