Load pf-ring kernel module in init container (#1476)

* Load kernel module in init container

* Update docs

* Update formatting

* Add pre-stop hook to unload pf_ring module

* Enable hook only on kernel module enabled

* fix template

* Use sidecontainer to unload pf_ring

* Add requirements for tracer into structs

* fix values

* fix typo

---------

Co-authored-by: Alon Girmonsky <1990761+alongir@users.noreply.github.com>
This commit is contained in:
Volodymyr Stoiko
2024-01-13 01:49:39 +02:00
committed by GitHub
parent 7df35e04a8
commit aaeb3ca1eb
8 changed files with 89 additions and 216 deletions

View File

@@ -79,6 +79,7 @@ type DockerConfig struct {
type ResourcesConfig struct {
Worker ResourceRequirements `yaml:"worker" json:"worker"`
Hub ResourceRequirements `yaml:"hub" json:"hub"`
Tracer ResourceRequirements `yaml:"tracer" json:"tracer"`
}
type AuthConfig struct {
@@ -113,16 +114,10 @@ type CapabilitiesConfig struct {
EBPFCapture []string `yaml:"ebpfCapture" json:"ebpfCapture" default:"[]"`
}
type KernelMapping struct {
Regexp string `yaml:"regexp" json:"regexp"`
ContainerImage string `yaml:"containerImage" json:"containerImage"`
}
type KernelModuleConfig struct {
Enabled bool `yaml:"enabled" json:"enabled" default:"true"`
Mode string `yaml:"mode" json:"mode" default:"auto"`
KernelMappings []KernelMapping `yaml:"kernelMappings" json:"kernelMappings"`
ImageRepoSecret string `yaml:"imageRepoSecret" json:"imageRepoSecret"`
Enabled bool `yaml:"enabled" json:"enabled" default:"true"`
Image string `yaml:"image" json:"image" default:"kubeshark/pf-ring-module:all"`
UnloadOnDestroy bool `yaml:"unloadOnDestroy" json:"unloadOnDestroy" default:"false"`
}
type MetricsConfig struct {