Pass db storage size and ration to calculate for badger db (#1788)

* Pass db storage size and ration to calculate for badger db

* Use badger max db size option
This commit is contained in:
Volodymyr Stoiko
2025-09-25 18:17:21 +03:00
committed by GitHub
parent 349d8b07df
commit f5167cbb2a
4 changed files with 10 additions and 2 deletions

View File

@@ -301,8 +301,9 @@ type SeLinuxOptionsConfig struct {
}
type CaptureConfig struct {
Stopped bool `yaml:"stopped" json:"stopped" default:"false"`
StopAfter string `yaml:"stopAfter" json:"stopAfter" default:"5m"`
Stopped bool `yaml:"stopped" json:"stopped" default:"false"`
StopAfter string `yaml:"stopAfter" json:"stopAfter" default:"5m"`
DbMaxSize string `yaml:"dbMaxSize" json:"dbMaxSize" default:""`
}
type TapConfig struct {

View File

@@ -140,6 +140,7 @@ Example for overriding image names:
| `tap.bpfOverride` | When using AF_PACKET as a traffic capture backend, override any existing pod targeting rules and set explicit BPF expression (e.g. `net 0.0.0.0/0`). | `[]` |
| `tap.capture.stopped` | Set to `false` to have traffic processing start automatically. When set to `true`, traffic processing is stopped by default, resulting in almost no resource consumption (e.g. Kubeshark is dormant). This property can be dynamically control via the dashboard. | `false` |
| `tap.capture.stopAfter` | Set to a duration (e.g. `30s`) to have traffic processing stop after no websocket activity between worker and hub. | `30s` |
| `tap.capture.dbMaxSize` | Maximum size for capture database (e.g., `4Gi`, `2000Mi`). When empty, automatically uses 80% of allocated storage (`tap.storageLimit`). | `""` |
| `tap.release.repo` | URL of the Helm chart repository | `https://helm.kubeshark.co` |
| `tap.release.name` | Helm release name | `kubeshark` |
| `tap.release.namespace` | Helm release namespace | `default` |

View File

@@ -99,6 +99,10 @@ spec:
- '{{ .Values.tap.misc.resolutionStrategy }}'
- -staletimeout
- '{{ .Values.tap.misc.staleTimeoutSeconds }}'
- -storage-size
- '{{ .Values.tap.storageLimit }}'
- -capture-db-max-size
- '{{ .Values.tap.capture.dbMaxSize }}'
{{- if .Values.tap.docker.overrideImage.worker }}
image: '{{ .Values.tap.docker.overrideImage.worker }}'
{{- else if .Values.tap.docker.overrideTag.worker }}

View File

@@ -29,6 +29,7 @@ tap:
capture:
stopped: false
stopAfter: 5m
dbMaxSize: ""
release:
repo: https://helm.kubeshark.co
name: kubeshark
@@ -149,6 +150,7 @@ tap:
ipv6: true
debug: false
dashboard:
streamingType: ""
completeStreamingEnabled: true
telemetry:
enabled: true