mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-02-14 10:00:08 +00:00
107 lines
3.5 KiB
YAML
107 lines
3.5 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: kubeshark-nginx-config-map
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "kubeshark.labels" . | nindent 4 }}
|
|
data:
|
|
default.conf: |
|
|
server {
|
|
listen 8080;
|
|
{{- if .Values.tap.ipv6 }}
|
|
listen [::]:8080;
|
|
{{- end }}
|
|
access_log /dev/stdout;
|
|
error_log /dev/stdout;
|
|
|
|
client_body_buffer_size 64k;
|
|
client_header_buffer_size 32k;
|
|
large_client_header_buffers 8 64k;
|
|
|
|
location {{ default "" (((.Values.tap).routing).front).basePath }}/api {
|
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/api(.*)$ $1 break;
|
|
proxy_pass http://kubeshark-hub;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Upgrade websocket;
|
|
proxy_set_header Connection Upgrade;
|
|
proxy_set_header Authorization $http_authorization;
|
|
proxy_pass_header Authorization;
|
|
proxy_connect_timeout 4s;
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 12s;
|
|
proxy_pass_request_headers on;
|
|
}
|
|
|
|
location {{ default "" (((.Values.tap).routing).front).basePath }}/mcp {
|
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/mcp(.*)$ /mcp$1 break;
|
|
proxy_pass http://kubeshark-hub;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Authorization $http_authorization;
|
|
proxy_pass_header Authorization;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_connect_timeout 30s;
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 30s;
|
|
proxy_pass_request_body on;
|
|
proxy_pass_request_headers on;
|
|
}
|
|
|
|
location {{ default "" (((.Values.tap).routing).front).basePath }}/saml {
|
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/saml(.*)$ /saml$1 break;
|
|
proxy_pass http://kubeshark-hub;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_connect_timeout 4s;
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 12s;
|
|
proxy_pass_request_headers on;
|
|
}
|
|
|
|
{{- if .Values.tap.auth.dexConfig }}
|
|
location /dex {
|
|
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/dex(.*)$ /dex$1 break;
|
|
proxy_pass http://kubeshark-dex;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Upgrade websocket;
|
|
proxy_set_header Connection Upgrade;
|
|
proxy_set_header Authorization $http_authorization;
|
|
proxy_pass_header Authorization;
|
|
proxy_connect_timeout 4s;
|
|
proxy_read_timeout 120s;
|
|
proxy_send_timeout 12s;
|
|
proxy_pass_request_headers on;
|
|
}
|
|
{{- end }}
|
|
|
|
{{- if (((.Values.tap).routing).front).basePath }}
|
|
location {{ .Values.tap.routing.front.basePath }} {
|
|
rewrite ^{{ .Values.tap.routing.front.basePath }}(.*)$ $1 break;
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
expires -1;
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
{{- end }}
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
index index.html index.htm;
|
|
try_files $uri $uri/ /index.html;
|
|
expires -1;
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|
|
|