Sean Condon | 670605a | 2021-12-13 12:58:20 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org> |
| 2 | # |
Sean Condon | 160ec1d | 2022-02-08 12:58:25 +0000 | [diff] [blame] | 3 | # SPDX-License-Identifier: Apache-2.0 |
Sean Condon | 670605a | 2021-12-13 12:58:20 +0000 | [diff] [blame] | 4 | |
| 5 | apiVersion: v1 |
| 6 | kind: ConfigMap |
| 7 | metadata: |
| 8 | name: {{ template "aether-enterprise-portal.fullname" . }} |
| 9 | namespace: {{ .Release.Namespace }} |
| 10 | labels: |
| 11 | release: {{ .Release.Name }} |
| 12 | heritage: {{ .Release.Service }} |
| 13 | data: |
| 14 | server-block.conf: |- |
| 15 | server { |
| 16 | listen {{.Values.Nginx.port}}; |
| 17 | ssl_certificate /usr/share/certs/aether-enterprise-portal.crt; |
| 18 | ssl_certificate_key /usr/share/certs/aether-enterprise-portal.key; |
| 19 | {{- if .Values.websocket.proxyEnabled }} |
| 20 | location /ws { |
| 21 | proxy_pass {{ .Values.websocket.protocol }}://{{ .Values.websocket.service }}:{{ .Values.websocket.port }}/ws; |
| 22 | proxy_http_version 1.1; |
| 23 | proxy_set_header Upgrade $http_upgrade; |
| 24 | proxy_set_header Connection "Upgrade"; |
| 25 | proxy_set_header Host $host; |
| 26 | }{{end}} |
| 27 | {{- if .Values.grafana.proxyEnabled }} |
| 28 | location /grafana/ { |
| 29 | proxy_pass {{ .Values.grafana.protocol }}://{{ .Values.grafana.service }}:{{ .Values.grafana.port }}/; |
| 30 | proxy_http_version 1.1; |
| 31 | proxy_redirect off; |
| 32 | proxy_set_header Upgrade $http_upgrade; |
| 33 | proxy_set_header Connection "Upgrade"; |
| 34 | proxy_set_header X-Real-IP $remote_addr; |
| 35 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 36 | proxy_set_header Host $http_host; |
| 37 | proxy_set_header X-NginX-Proxy true; |
| 38 | proxy_hide_header 'X-Frame-Options'; |
| 39 | add_header X-Frame-Options SAMEORIGIN; |
| 40 | }{{end}} |
| 41 | {{- if .Values.prometheus.proxyEnabled }} |
| 42 | location /prometheus/ { |
| 43 | proxy_pass {{ .Values.prometheus.protocol }}://{{ .Values.prometheus.service }}:{{ .Values.prometheus.port }}/; |
| 44 | proxy_http_version 1.1; |
| 45 | proxy_set_header Upgrade $http_upgrade; |
| 46 | add_header X-Frame-Options SAMEORIGIN; |
| 47 | }{{end}} |
Sean Condon | fe2c974 | 2022-03-25 16:42:49 +0000 | [diff] [blame] | 48 | {{- if .Values.rasa.proxyEnabled }} |
| 49 | location /rasa/ { |
| 50 | proxy_pass {{ .Values.rasa.protocol }}://{{ .Values.rasa.service }}:{{ .Values.rasa.port }}/; |
| 51 | proxy_http_version 1.1; |
| 52 | proxy_set_header Upgrade $http_upgrade; |
| 53 | proxy_set_header Connection "Upgrade"; |
| 54 | proxy_set_header Host $host; |
| 55 | }{{end}} |
| 56 | {{- if .Values.mailhog.proxyEnabled }} |
| 57 | location /mailhog/ { |
| 58 | proxy_pass {{ .Values.mailhog.protocol }}://{{ .Values.mailhog.service }}:{{ .Values.mailhog.port }}/; |
| 59 | proxy_http_version 1.1; |
| 60 | proxy_set_header Upgrade $http_upgrade; |
| 61 | add_header X-Frame-Options SAMEORIGIN; |
| 62 | }{{end}} |
Sean Condon | 670605a | 2021-12-13 12:58:20 +0000 | [diff] [blame] | 63 | location / { |
| 64 | root /usr/share/nginx/html; |
| 65 | } |
| 66 | {{- range $key, $value := .Values.aetherservices }} |
| 67 | location /{{ $key }}/ { |
| 68 | proxy_pass {{ $value.protocol}}://{{$key}}:{{ $value.http }}/; |
| 69 | proxy_http_version 1.1; |
| 70 | proxy_set_header Upgrade $http_upgrade; |
| 71 | proxy_set_header Connection "Upgrade"; |
| 72 | proxy_connect_timeout {{ $value.streamTimeout }}; |
| 73 | proxy_send_timeout {{ $value.streamTimeout }}; |
| 74 | proxy_read_timeout {{ $value.streamTimeout }}; |
| 75 | send_timeout {{ $value.streamTimeout }}; |
| 76 | } |
| 77 | {{ end }} |
| 78 | } |
| 79 | |