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: |
| 5 | name: portalapps |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 6 | namespace: "{{ .Values.nsPrefix }}-portal" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 7 | spec: |
| 8 | selector: |
| 9 | matchLabels: |
| 10 | app: portalapps |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: portalapps |
| 15 | name: portalapps |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | spec: |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 17 | initContainers: |
| 18 | - command: |
| 19 | - /root/ready.py |
| 20 | args: |
| 21 | - --container-name |
| 22 | - portaldb |
| 23 | env: |
| 24 | - name: NAMESPACE |
| 25 | valueFrom: |
| 26 | fieldRef: |
| 27 | apiVersion: v1 |
| 28 | fieldPath: metadata.namespace |
| 29 | image: {{ .Values.image.readiness }} |
| 30 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 31 | name: portalapps-readiness |
| 32 | - command: ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -pAa123456 -h portaldb < /portal-mysql/oom_updates.sql; fi"] |
| 33 | volumeMounts: |
| 34 | - mountPath: /portal-mysql/oom_updates.sql |
| 35 | name: portal-mariadb-onboarding-sql |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 36 | subPath: oom_updates.sql |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 37 | - mountPath: /portal_root/ |
| 38 | name: portal-root |
| 39 | image: {{ .Values.image.mariadbClient }} |
| 40 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 41 | name: provision-portaldb-users |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 42 | - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"] |
| 43 | volumeMounts: |
| 44 | - name: portal-logs |
| 45 | mountPath: /ubuntu-init/ |
| 46 | image: {{ .Values.image.ubuntuInit }} |
| 47 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 48 | name: portal-app-logs-init |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 49 | containers: |
kerenj | cbac010 | 2017-08-23 10:22:33 +0000 | [diff] [blame] | 50 | - image: {{ .Values.image.portalapps }} |
| 51 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 52 | lifecycle: |
| 53 | postStart: |
| 54 | exec: |
| 55 | command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"] |
| 56 | name: portalapps |
| 57 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 58 | - mountPath: /etc/localtime |
| 59 | name: localtime |
| 60 | readOnly: true |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 61 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 62 | name: onap-portal-properties |
| 63 | subPath: fusion.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 64 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 65 | name: onap-portal-properties |
| 66 | subPath: openid-connect.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 67 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 68 | name: onap-portal-properties |
| 69 | subPath: system.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 70 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 71 | name: onap-portal-properties |
| 72 | subPath: portal.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 73 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml" |
Mandeep Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 74 | name: portal-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 75 | subPath: logback.xml |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 76 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 77 | name: portal-sdkapp-properties |
| 78 | subPath: system.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 79 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 80 | name: portal-sdkapp-properties |
| 81 | subPath: portal.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 82 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties" |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 83 | name: portal-sdkapp-properties |
| 84 | subPath: fusion.properties |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 85 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml" |
| 86 | name: sdkapp-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 87 | subPath: logback.xml |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 88 | - mountPath: /portal_root/ |
| 89 | name: portal-root |
Mandeep Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 90 | - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs" |
Mandeep Khinda | 82c63d3 | 2017-08-21 16:04:37 -0400 | [diff] [blame] | 91 | name: portal-logs |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 92 | - mountPath: /var/log/onap |
| 93 | name: portal-logs2 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 94 | ports: |
| 95 | - containerPort: 8005 |
| 96 | - containerPort: 8009 |
| 97 | - containerPort: 8080 |
| 98 | readinessProbe: |
| 99 | tcpSocket: |
| 100 | port: 8080 |
| 101 | initialDelaySeconds: 5 |
| 102 | periodSeconds: 10 |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 103 | - image: {{ .Values.image.filebeat }} |
| 104 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 105 | name: filebeat-onap |
| 106 | volumeMounts: |
| 107 | - mountPath: /usr/share/filebeat/filebeat.yml |
| 108 | name: filebeat-conf |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 109 | subPath: filebeat.yml |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 110 | - mountPath: /var/log/onap |
| 111 | name: portal-logs2 |
| 112 | - mountPath: /usr/share/filebeat/data |
| 113 | name: portal-data-filebeat |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 114 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 115 | - name: localtime |
| 116 | hostPath: |
| 117 | path: /etc/localtime |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 118 | - name: filebeat-conf |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 119 | configMap: |
| 120 | name: portal-filebeat-configmap |
yuryn | d0707be | 2017-09-27 14:54:18 +0300 | [diff] [blame] | 121 | - name: portal-logs2 |
| 122 | emptyDir: {} |
| 123 | - name: portal-data-filebeat |
| 124 | emptyDir: {} |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 125 | - name: onap-portal-properties |
| 126 | configMap: |
| 127 | defaultMode: 0755 |
| 128 | name: portal-onap-portal-configmap |
| 129 | - name: portal-sdkapp-properties |
| 130 | configMap: |
| 131 | defaultMode: 0755 |
| 132 | name: portal-onap-portal-sdk-configmap |
Mandeep Khinda | f8bda5c | 2017-09-11 20:12:08 +0000 | [diff] [blame] | 133 | - name: portal-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 134 | configMap: |
| 135 | name: portal-onapportal-log-configmap |
Mandeep Khinda | 52c8fd6 | 2017-10-24 22:13:03 +0000 | [diff] [blame] | 136 | - name: sdkapp-logback |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 137 | configMap: |
| 138 | name: portal-onapportalsdk-log-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 139 | - name: portal-mariadb-onboarding-sql |
mayank | c8f632c | 2018-01-21 10:08:25 +0000 | [diff] [blame] | 140 | configMap: |
| 141 | name: portal-mariadb-configmap |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 142 | - name: portal-root |
| 143 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 144 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal |
Mandeep Khinda | 82c63d3 | 2017-08-21 16:04:37 -0400 | [diff] [blame] | 145 | - name: portal-logs |
| 146 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 147 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 148 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 149 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
vasundhra | 6f62044 | 2017-11-22 12:26:25 +0000 | [diff] [blame] | 150 | #{{ end }} |