Sean Condon | 6fc9968 | 2022-02-04 10:48:17 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: 2020-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 | 6fc9968 | 2022-02-04 10:48:17 +0000 | [diff] [blame] | 4 | |
| 5 | apiVersion: v1 |
| 6 | kind: ConfigMap |
| 7 | metadata: |
| 8 | name: {{ template "aether-roc-gui.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-roc-gui.crt; |
| 18 | ssl_certificate_key /usr/share/certs/aether-roc-gui.key; |
Sean Condon | 6fc9968 | 2022-02-04 10:48:17 +0000 | [diff] [blame] | 19 | {{- 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.acc.proxyEnabled }} |
| 34 | location /prometheus-acc/ { |
| 35 | proxy_pass {{ .Values.prometheus.acc.protocol }}://{{ .Values.prometheus.acc.service }}:{{ .Values.prometheus.acc.port }}/; |
| 36 | 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/ { |
| 42 | proxy_pass {{ .Values.prometheus.amp.protocol }}://{{ .Values.prometheus.amp.service }}:{{ .Values.prometheus.amp.port }}/; |
| 43 | 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}}/ { |
| 49 | proxy_pass {{ $site.protocol }}://{{ $site.service }}:{{ $site.port }}/; |
| 50 | 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 }}/ { |
| 66 | proxy_pass {{ $value.protocol}}://{{$key}}:{{ $value.http }}/; |
| 67 | 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 | |