blob: 133fbd81ea357346903c49d82cab97a88d206982 [file] [log] [blame]
Sean Condon670605a2021-12-13 12:58:20 +00001# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
2#
Sean Condon160ec1d2022-02-08 12:58:25 +00003# SPDX-License-Identifier: Apache-2.0
Sean Condon670605a2021-12-13 12:58:20 +00004
5apiVersion: v1
6kind: ConfigMap
7metadata:
8 name: {{ template "aether-enterprise-portal.fullname" . }}
9 namespace: {{ .Release.Namespace }}
10 labels:
11 release: {{ .Release.Name }}
12 heritage: {{ .Release.Service }}
13data:
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;
Sean Condon670605a2021-12-13 12:58:20 +000019 {{- if .Values.grafana.proxyEnabled }}
20 location /grafana/ {
21 proxy_pass {{ .Values.grafana.protocol }}://{{ .Values.grafana.service }}:{{ .Values.grafana.port }}/;
22 proxy_http_version 1.1;
23 proxy_redirect off;
24 proxy_set_header Upgrade $http_upgrade;
25 proxy_set_header Connection "Upgrade";
26 proxy_set_header X-Real-IP $remote_addr;
27 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
28 proxy_set_header Host $http_host;
29 proxy_set_header X-NginX-Proxy true;
30 proxy_hide_header 'X-Frame-Options';
31 add_header X-Frame-Options SAMEORIGIN;
32 }{{end}}
33 {{- if .Values.prometheus.proxyEnabled }}
34 location /prometheus/ {
35 proxy_pass {{ .Values.prometheus.protocol }}://{{ .Values.prometheus.service }}:{{ .Values.prometheus.port }}/;
36 proxy_http_version 1.1;
37 proxy_set_header Upgrade $http_upgrade;
38 add_header X-Frame-Options SAMEORIGIN;
39 }{{end}}
Sean Condonfe2c9742022-03-25 16:42:49 +000040 {{- if .Values.rasa.proxyEnabled }}
41 location /rasa/ {
42 proxy_pass {{ .Values.rasa.protocol }}://{{ .Values.rasa.service }}:{{ .Values.rasa.port }}/;
43 proxy_http_version 1.1;
44 proxy_set_header Upgrade $http_upgrade;
45 proxy_set_header Connection "Upgrade";
46 proxy_set_header Host $host;
47 }{{end}}
48 {{- if .Values.mailhog.proxyEnabled }}
49 location /mailhog/ {
50 proxy_pass {{ .Values.mailhog.protocol }}://{{ .Values.mailhog.service }}:{{ .Values.mailhog.port }}/;
51 proxy_http_version 1.1;
52 proxy_set_header Upgrade $http_upgrade;
53 add_header X-Frame-Options SAMEORIGIN;
54 }{{end}}
Sean Condon670605a2021-12-13 12:58:20 +000055 location / {
56 root /usr/share/nginx/html;
57 }
58 {{- range $key, $value := .Values.aetherservices }}
59 location /{{ $key }}/ {
60 proxy_pass {{ $value.protocol}}://{{$key}}:{{ $value.http }}/;
61 proxy_http_version 1.1;
62 proxy_set_header Upgrade $http_upgrade;
63 proxy_set_header Connection "Upgrade";
64 proxy_connect_timeout {{ $value.streamTimeout }};
65 proxy_send_timeout {{ $value.streamTimeout }};
66 proxy_read_timeout {{ $value.streamTimeout }};
67 send_timeout {{ $value.streamTimeout }};
68 }
69 {{ end }}
70 }
71