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