blob: 4fdb450665629c15cb4123667ec1ef09251e8889 [file] [log] [blame]
# SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org>
#
# SPDX-License-Identifier: Apache-2.0
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "aether-roc-gui.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
server-block.conf: |-
server {
listen {{.Values.Nginx.port}};
ssl_certificate /usr/share/certs/aether-roc-gui.crt;
ssl_certificate_key /usr/share/certs/aether-roc-gui.key;
{{- if .Values.grafana.proxyEnabled }}
location /grafana/ {
proxy_pass {{ .Values.grafana.protocol }}://{{ .Values.grafana.service }}:{{ .Values.grafana.port }}/;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_hide_header 'X-Frame-Options';
add_header X-Frame-Options SAMEORIGIN;
}{{end}}
{{- if .Values.prometheus.acc.proxyEnabled }}
location /prometheus-acc/ {
proxy_pass {{ .Values.prometheus.acc.protocol }}://{{ .Values.prometheus.acc.service }}:{{ .Values.prometheus.acc.port }}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
add_header X-Frame-Options SAMEORIGIN;
}{{end}}
{{- if .Values.prometheus.amp.proxyEnabled }}
location /prometheus-amp/ {
proxy_pass {{ .Values.prometheus.amp.protocol }}://{{ .Values.prometheus.amp.service }}:{{ .Values.prometheus.amp.port }}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
add_header X-Frame-Options SAMEORIGIN;
}{{end}}
{{- range $siteid, $site := .Values.prometheus.site }}
location /prometheus-{{$site.name}}/ {
proxy_pass {{ $site.protocol }}://{{ $site.service }}:{{ $site.port }}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
add_header X-Frame-Options SAMEORIGIN;
}{{end}}
location / {
root /usr/share/nginx/html;
}
location /rs/nav/uiextensions {
root /usr/share/nginx/html;
}
location /kubernetes-api/ {
proxy_pass http://localhost:8001/;
proxy_http_version 1.1;
}
{{- range $key, $value := .Values.aetherservices }}
location /{{ $key }}/ {
proxy_pass {{ $value.protocol}}://{{$key}}:{{ $value.http }}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_connect_timeout {{ $value.streamTimeout }};
proxy_send_timeout {{ $value.streamTimeout }};
proxy_read_timeout {{ $value.streamTimeout }};
send_timeout {{ $value.streamTimeout }};
}
{{ end }}
}