blob: ccd086caf5466bd872acf8cc97ebb484523444d8 [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disablePortalPortalapps }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
BorislavG8bfc6cf2018-02-27 15:04:26 +000019 name: portal-apps
20 namespace: "{{ .Values.nsPrefix }}"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040021spec:
vaibhav_16dec49302052018-02-15 10:00:06 +000022 replicas: {{ .Values.portalAppsReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040023 selector:
24 matchLabels:
25 app: portalapps
26 template:
27 metadata:
28 labels:
29 app: portalapps
BorislavG8bfc6cf2018-02-27 15:04:26 +000030 name: portal-apps
Mandeep Khindad6ea9872017-06-24 11:49:37 -040031 spec:
vasundhra6f620442017-11-22 12:26:25 +000032 initContainers:
33 - command:
34 - /root/ready.py
35 args:
36 - --container-name
37 - portaldb
38 env:
39 - name: NAMESPACE
40 valueFrom:
41 fieldRef:
42 apiVersion: v1
43 fieldPath: metadata.namespace
44 image: {{ .Values.image.readiness }}
45 imagePullPolicy: {{ .Values.pullPolicy }}
46 name: portalapps-readiness
47 - command: ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -pAa123456 -h portaldb < /portal-mysql/oom_updates.sql; fi"]
48 volumeMounts:
49 - mountPath: /portal-mysql/oom_updates.sql
50 name: portal-mariadb-onboarding-sql
mayankc8f632c2018-01-21 10:08:25 +000051 subPath: oom_updates.sql
vasundhra6f620442017-11-22 12:26:25 +000052 - mountPath: /portal_root/
53 name: portal-root
54 image: {{ .Values.image.mariadbClient }}
55 imagePullPolicy: {{ .Values.pullPolicy }}
56 name: provision-portaldb-users
mayankc8f632c2018-01-21 10:08:25 +000057 - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"]
58 volumeMounts:
59 - name: portal-logs
60 mountPath: /ubuntu-init/
61 image: {{ .Values.image.ubuntuInit }}
62 imagePullPolicy: {{ .Values.pullPolicy }}
63 name: portal-app-logs-init
Mandeep Khindad6ea9872017-06-24 11:49:37 -040064 containers:
kerenjcbac0102017-08-23 10:22:33 +000065 - image: {{ .Values.image.portalapps }}
66 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040067 lifecycle:
68 postStart:
69 exec:
70 command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
71 name: portalapps
72 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030073 - mountPath: /etc/localtime
74 name: localtime
75 readOnly: true
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000076 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000077 name: onap-portal-properties
78 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000079 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
mayankc8f632c2018-01-21 10:08:25 +000080 name: onap-portal-properties
81 subPath: openid-connect.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000082 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000083 name: onap-portal-properties
84 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000085 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000086 name: onap-portal-properties
87 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000088 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +000089 name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +000090 subPath: logback.xml
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000091 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
mayankc8f632c2018-01-21 10:08:25 +000092 name: portal-sdkapp-properties
93 subPath: system.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000094 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
mayankc8f632c2018-01-21 10:08:25 +000095 name: portal-sdkapp-properties
96 subPath: portal.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +000097 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
mayankc8f632c2018-01-21 10:08:25 +000098 name: portal-sdkapp-properties
99 subPath: fusion.properties
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000100 - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
101 name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +0000102 subPath: logback.xml
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400103 - mountPath: /portal_root/
104 name: portal-root
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000105 - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400106 name: portal-logs
yurynd0707be2017-09-27 14:54:18 +0300107 - mountPath: /var/log/onap
108 name: portal-logs2
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400109 ports:
110 - containerPort: 8005
111 - containerPort: 8009
112 - containerPort: 8080
113 readinessProbe:
114 tcpSocket:
115 port: 8080
116 initialDelaySeconds: 5
117 periodSeconds: 10
yurynd0707be2017-09-27 14:54:18 +0300118 - image: {{ .Values.image.filebeat }}
119 imagePullPolicy: {{ .Values.pullPolicy }}
120 name: filebeat-onap
121 volumeMounts:
122 - mountPath: /usr/share/filebeat/filebeat.yml
123 name: filebeat-conf
mayankc8f632c2018-01-21 10:08:25 +0000124 subPath: filebeat.yml
yurynd0707be2017-09-27 14:54:18 +0300125 - mountPath: /var/log/onap
126 name: portal-logs2
127 - mountPath: /usr/share/filebeat/data
128 name: portal-data-filebeat
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400129 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300130 - name: localtime
131 hostPath:
132 path: /etc/localtime
yurynd0707be2017-09-27 14:54:18 +0300133 - name: filebeat-conf
mayankc8f632c2018-01-21 10:08:25 +0000134 configMap:
135 name: portal-filebeat-configmap
yurynd0707be2017-09-27 14:54:18 +0300136 - name: portal-logs2
137 emptyDir: {}
138 - name: portal-data-filebeat
139 emptyDir: {}
mayankc8f632c2018-01-21 10:08:25 +0000140 - name: onap-portal-properties
141 configMap:
142 defaultMode: 0755
143 name: portal-onap-portal-configmap
144 - name: portal-sdkapp-properties
145 configMap:
146 defaultMode: 0755
147 name: portal-onap-portal-sdk-configmap
Mandeep Khindaf8bda5c2017-09-11 20:12:08 +0000148 - name: portal-logback
mayankc8f632c2018-01-21 10:08:25 +0000149 configMap:
150 name: portal-onapportal-log-configmap
Mandeep Khinda52c8fd62017-10-24 22:13:03 +0000151 - name: sdkapp-logback
mayankc8f632c2018-01-21 10:08:25 +0000152 configMap:
153 name: portal-onapportalsdk-log-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400154 - name: portal-mariadb-onboarding-sql
mayankc8f632c2018-01-21 10:08:25 +0000155 configMap:
156 name: portal-mariadb-configmap
Mandeep Khindad6ea9872017-06-24 11:49:37 -0400157 - name: portal-root
158 hostPath:
kerenj2dabc182018-02-25 08:12:21 +0000159 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal
Mandeep Khinda82c63d32017-08-21 16:04:37 -0400160 - name: portal-logs
161 hostPath:
kerenj2dabc182018-02-25 08:12:21 +0000162 path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal/logs
Borislav Glozman5197e2e2017-07-24 10:45:28 +0300163 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +0000164 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
vasundhra6f620442017-11-22 12:26:25 +0000165#{{ end }}