blob: 99075d2abcccf19b03c64b90d555acf5c62c9943 [file] [log] [blame]
Sean Condon6fc99682022-02-04 10:48:17 +00001# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
2#
Sean Condon160ec1d2022-02-08 12:58:25 +00003# SPDX-License-Identifier: Apache-2.0
Sean Condon6fc99682022-02-04 10:48:17 +00004
5apiVersion: v1
6kind: ConfigMap
7metadata:
8 name: {{ template "aether-roc-gui.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-roc-gui.crt;
18 ssl_certificate_key /usr/share/certs/aether-roc-gui.key;
Sean Condon6fc99682022-02-04 10:48:17 +000019 {{- if .Values.grafana.proxyEnabled }}
20 location /grafana/ {
SeanCondon9a99c262023-01-09 17:20:49 +000021 proxy_pass {{ .Values.grafana.protocol }}://{{tpl (.Values.grafana.service | default .Values.grafana.service) . }}:{{ .Values.grafana.port }}/;
Sean Condon6fc99682022-02-04 10:48:17 +000022 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.acc.proxyEnabled }}
34 location /prometheus-acc/ {
SeanCondon9a99c262023-01-09 17:20:49 +000035 proxy_pass {{ .Values.prometheus.acc.protocol }}://{{tpl (.Values.prometheus.acc.service | default .Values.prometheus.acc.service) . }}:{{ .Values.prometheus.acc.port }}/;
Sean Condon6fc99682022-02-04 10:48:17 +000036 proxy_http_version 1.1;
37 proxy_set_header Upgrade $http_upgrade;
38 add_header X-Frame-Options SAMEORIGIN;
39 }{{end}}
40 {{- if .Values.prometheus.amp.proxyEnabled }}
41 location /prometheus-amp/ {
SeanCondon9a99c262023-01-09 17:20:49 +000042 proxy_pass {{ .Values.prometheus.amp.protocol }}://{{tpl (.Values.prometheus.amp.service | default .Values.prometheus.amp.service) . }}:{{ .Values.prometheus.amp.port }}/;
Sean Condon6fc99682022-02-04 10:48:17 +000043 proxy_http_version 1.1;
44 proxy_set_header Upgrade $http_upgrade;
45 add_header X-Frame-Options SAMEORIGIN;
46 }{{end}}
47 {{- range $siteid, $site := .Values.prometheus.site }}
48 location /prometheus-{{$site.name}}/ {
SeanCondon9a99c262023-01-09 17:20:49 +000049 proxy_pass {{ $site.protocol }}://{{ tpl $site.service $ }}:{{ $site.port }}/;
Sean Condon6fc99682022-02-04 10:48:17 +000050 proxy_http_version 1.1;
51 proxy_set_header Upgrade $http_upgrade;
52 add_header X-Frame-Options SAMEORIGIN;
53 }{{end}}
54 location / {
55 root /usr/share/nginx/html;
56 }
57 location /rs/nav/uiextensions {
58 root /usr/share/nginx/html;
59 }
60 location /kubernetes-api/ {
61 proxy_pass http://localhost:8001/;
62 proxy_http_version 1.1;
63 }
64 {{- range $key, $value := .Values.aetherservices }}
65 location /{{ $key }}/ {
SeanCondon9a99c262023-01-09 17:20:49 +000066 proxy_pass {{ $value.protocol}}://{{ tpl $value.service $ }}:{{ $value.http }}/;
Sean Condon6fc99682022-02-04 10:48:17 +000067 proxy_http_version 1.1;
68 proxy_set_header Upgrade $http_upgrade;
69 proxy_set_header Connection "Upgrade";
70 proxy_connect_timeout {{ $value.streamTimeout }};
71 proxy_send_timeout {{ $value.streamTimeout }};
72 proxy_read_timeout {{ $value.streamTimeout }};
73 send_timeout {{ $value.streamTimeout }};
74 }
75 {{ end }}
76 }
77