vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # 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 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disablePortalPortalapps }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 19 | name: portal-apps |
| 20 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 21 | spec: |
vaibhav_16dec | 4930205 | 2018-02-15 10:00:06 +0000 | [diff] [blame] | 22 | replicas: {{ .Values.portalAppsReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 23 | selector: |
| 24 | matchLabels: |
| 25 | app: portalapps |
| 26 | template: |
| 27 | metadata: |
| 28 | labels: |
| 29 | app: portalapps |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 30 | name: portal-apps |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 31 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 32 | 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 |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 51 | subPath: oom_updates.sql |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 52 | - mountPath: /portal_root/ |
| 53 | name: portal-root |
| 54 | image: {{ .Values.image.mariadbClient }} |
| 55 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 56 | name: provision-portaldb-users |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 57 | - 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 Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 64 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 65 | - image: {{ .Values.image.portalapps }} |
| 66 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 67 | lifecycle: |
| 68 | postStart: |
| 69 | exec: |
| 70 | command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"] |
| 71 | name: portalapps |
| 72 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 73 | - mountPath: /etc/localtime |
| 74 | name: localtime |
| 75 | readOnly: true |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 76 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 77 | name: onap-portal-properties |
| 78 | subPath: fusion.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 79 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 80 | name: onap-portal-properties |
| 81 | subPath: openid-connect.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 82 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 83 | name: onap-portal-properties |
| 84 | subPath: system.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 85 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 86 | name: onap-portal-properties |
| 87 | subPath: portal.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 88 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml" |
Mandeep Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 89 | name: portal-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 90 | subPath: logback.xml |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 91 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 92 | name: portal-sdkapp-properties |
| 93 | subPath: system.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 94 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 95 | name: portal-sdkapp-properties |
| 96 | subPath: portal.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 97 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 98 | name: portal-sdkapp-properties |
| 99 | subPath: fusion.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 100 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml" |
| 101 | name: sdkapp-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 102 | subPath: logback.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 103 | - mountPath: /portal_root/ |
| 104 | name: portal-root |
Mandeep Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 105 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs" |
Mandeep Khinda | 82c63d3 | 2017-08-21 16:04:37 -0400 | [diff] [blame] | 106 | name: portal-logs |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 107 | - mountPath: /var/log/onap |
| 108 | name: portal-logs2 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 109 | ports: |
| 110 | - containerPort: 8005 |
| 111 | - containerPort: 8009 |
| 112 | - containerPort: 8080 |
| 113 | readinessProbe: |
| 114 | tcpSocket: |
| 115 | port: 8080 |
| 116 | initialDelaySeconds: 5 |
| 117 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 118 | - 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 |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 124 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 125 | - mountPath: /var/log/onap |
| 126 | name: portal-logs2 |
| 127 | - mountPath: /usr/share/filebeat/data |
| 128 | name: portal-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 129 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 130 | - name: localtime |
| 131 | hostPath: |
| 132 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 133 | - name: filebeat-conf |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 134 | configMap: |
| 135 | name: portal-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 136 | - name: portal-logs2 |
| 137 | emptyDir: {} |
| 138 | - name: portal-data-filebeat |
| 139 | emptyDir: {} |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 140 | - 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 Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 148 | - name: portal-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 149 | configMap: |
| 150 | name: portal-onapportal-log-configmap |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 151 | - name: sdkapp-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 152 | configMap: |
| 153 | name: portal-onapportalsdk-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 154 | - name: portal-mariadb-onboarding-sql |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 155 | configMap: |
| 156 | name: portal-mariadb-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 157 | - name: portal-root |
| 158 | hostPath: |
kerenj | 2dabc18 | 2018-02-25 08:12:21 +0000 | [diff] [blame] | 159 | path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal |
Mandeep Khinda | 82c63d3 | 2017-08-21 16:04:37 -0400 | [diff] [blame] | 160 | - name: portal-logs |
| 161 | hostPath: |
kerenj | 2dabc18 | 2018-02-25 08:12:21 +0000 | [diff] [blame] | 162 | path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/portal/logs |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 163 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 164 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 165 | #{{ end }} |