blob: 0cf6ad2b724c3c6c3747b05c582201714a115931 [file] [log] [blame]
Sean Condon6fc99682022-02-04 10:48:17 +00001# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
2#
3# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
4
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;
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.acc.proxyEnabled }}
42 location /prometheus-acc/ {
43 proxy_pass {{ .Values.prometheus.acc.protocol }}://{{ .Values.prometheus.acc.service }}:{{ .Values.prometheus.acc.port }}/;
44 proxy_http_version 1.1;
45 proxy_set_header Upgrade $http_upgrade;
46 add_header X-Frame-Options SAMEORIGIN;
47 }{{end}}
48 {{- if .Values.prometheus.amp.proxyEnabled }}
49 location /prometheus-amp/ {
50 proxy_pass {{ .Values.prometheus.amp.protocol }}://{{ .Values.prometheus.amp.service }}:{{ .Values.prometheus.amp.port }}/;
51 proxy_http_version 1.1;
52 proxy_set_header Upgrade $http_upgrade;
53 add_header X-Frame-Options SAMEORIGIN;
54 }{{end}}
55 {{- range $siteid, $site := .Values.prometheus.site }}
56 location /prometheus-{{$site.name}}/ {
57 proxy_pass {{ $site.protocol }}://{{ $site.service }}:{{ $site.port }}/;
58 proxy_http_version 1.1;
59 proxy_set_header Upgrade $http_upgrade;
60 add_header X-Frame-Options SAMEORIGIN;
61 }{{end}}
62 location / {
63 root /usr/share/nginx/html;
64 }
65 location /rs/nav/uiextensions {
66 root /usr/share/nginx/html;
67 }
68 location /kubernetes-api/ {
69 proxy_pass http://localhost:8001/;
70 proxy_http_version 1.1;
71 }
72 {{- range $key, $value := .Values.aetherservices }}
73 location /{{ $key }}/ {
74 proxy_pass {{ $value.protocol}}://{{$key}}:{{ $value.http }}/;
75 proxy_http_version 1.1;
76 proxy_set_header Upgrade $http_upgrade;
77 proxy_set_header Connection "Upgrade";
78 proxy_connect_timeout {{ $value.streamTimeout }};
79 proxy_send_timeout {{ $value.streamTimeout }};
80 proxy_read_timeout {{ $value.streamTimeout }};
81 send_timeout {{ $value.streamTimeout }};
82 }
83 {{ end }}
84 }
85