Add stopAfter option to disable capture when inactive (#1778)

* Add stopAfter option to disable capture when inactive

* Use 5m dorman

* Add capture stop after flag in hub
This commit is contained in:
Volodymyr Stoiko
2025-08-12 21:23:16 +03:00
committed by GitHub
parent 352484b5f6
commit 56b936b8b8
7 changed files with 38 additions and 24 deletions

View File

@@ -149,6 +149,10 @@ func CreateDefaultConfig() ConfigStruct {
Dashboard: configStructs.DashboardConfig{
CompleteStreamingEnabled: true,
},
Capture: configStructs.CaptureConfig{
Stopped: false,
StopAfter: "5m",
},
},
}
}

View File

@@ -298,6 +298,11 @@ type SeLinuxOptionsConfig struct {
User string `yaml:"user" json:"user"`
}
type CaptureConfig struct {
Stopped bool `yaml:"stopped" json:"stopped" default:"false"`
StopAfter string `yaml:"stopAfter" json:"stopAfter" default:"5m"`
}
type TapConfig struct {
Docker DockerConfig `yaml:"docker" json:"docker"`
Proxy ProxyConfig `yaml:"proxy" json:"proxy"`
@@ -305,7 +310,7 @@ type TapConfig struct {
Namespaces []string `yaml:"namespaces" json:"namespaces" default:"[]"`
ExcludedNamespaces []string `yaml:"excludedNamespaces" json:"excludedNamespaces" default:"[]"`
BpfOverride string `yaml:"bpfOverride" json:"bpfOverride" default:""`
Stopped bool `yaml:"stopped" json:"stopped" default:"false"`
Capture CaptureConfig `yaml:"capture" json:"capture"`
Release ReleaseConfig `yaml:"release" json:"release"`
PersistentStorage bool `yaml:"persistentStorage" json:"persistentStorage" default:"false"`
PersistentStorageStatic bool `yaml:"persistentStorageStatic" json:"persistentStorageStatic" default:"false"`