🔨 Create helm values for nginx proxy settings

This commit is contained in:
tiptophelmet
2026-04-13 19:20:33 +03:00
parent fa03da2fd4
commit 6762f54eaf
4 changed files with 30 additions and 0 deletions

View File

@@ -153,6 +153,14 @@ func CreateDefaultConfig() ConfigStruct {
LDAP: []uint16{389},
DIAMETER: []uint16{3868},
},
Nginx: configStructs.NginxConfig{
Proxy: configStructs.ProxyNginxConfig{
BufferSize: "64k",
BuffersCount: "4",
BuffersSize: "128k",
BusyBuffersSize: "128k",
},
},
Dashboard: configStructs.DashboardConfig{
CompleteStreamingEnabled: true,
ClusterWideMapEnabled: false,

View File

@@ -209,6 +209,17 @@ type FrontRoutingConfig struct {
BasePath string `yaml:"basePath" json:"basePath" default:""`
}
type NginxConfig struct {
Proxy ProxyNginxConfig `yaml:"proxy" json:"proxy"`
}
type ProxyNginxConfig struct {
BufferSize string `yaml:"bufferSize" json:"bufferSize" default:"64k"`
BuffersCount string `yaml:"buffersCount" json:"buffersCount" default:"4"`
BuffersSize string `yaml:"buffersSize" json:"buffersSize" default:"128k"`
BusyBuffersSize string `yaml:"busyBuffersSize" json:"busyBuffersSize" default:"128k"`
}
type ReleaseConfig struct {
Repo string `yaml:"repo" json:"repo" default:"https://helm.kubeshark.com"`
Name string `yaml:"name" json:"name" default:"kubeshark"`
@@ -406,6 +417,7 @@ type TapConfig struct {
Routing RoutingConfig `yaml:"routing" json:"routing"`
IPv6 bool `yaml:"ipv6" json:"ipv6" default:"true"`
Debug bool `yaml:"debug" json:"debug" default:"false"`
Nginx NginxConfig `yaml:"nginx" json:"nginx"`
Dashboard DashboardConfig `yaml:"dashboard" json:"dashboard"`
Telemetry TelemetryConfig `yaml:"telemetry" json:"telemetry"`
ResourceGuard ResourceGuardConfig `yaml:"resourceGuard" json:"resourceGuard"`

View File

@@ -20,6 +20,10 @@ data:
client_header_buffer_size 32k;
large_client_header_buffers 8 64k;
proxy_buffer_size {{ .Values.tap.nginx.proxy.bufferSize }};
proxy_buffers {{ .Values.tap.nginx.proxy.buffersCount }} {{ .Values.tap.nginx.proxy.buffersSize }};
proxy_busy_buffers_size {{ .Values.tap.nginx.proxy.busyBuffersSize }};
location {{ default "" (((.Values.tap).routing).front).basePath }}/api {
rewrite ^{{ default "" (((.Values.tap).routing).front).basePath }}/api(.*)$ $1 break;
proxy_pass http://kubeshark-hub;

View File

@@ -180,6 +180,12 @@ tap:
routing:
front:
basePath: ""
nginx:
proxy:
bufferSize: 64k
buffersCount: 4
buffersSize: 128k
busyBuffersSize: 128k
ipv6: true
debug: false
dashboard: