github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/monitor/internal/pod/config.go (about) 1 package podmonitor 2 3 import ( 4 "go.aporeto.io/trireme-lib/monitor/extractors" 5 ) 6 7 // Config is the config for the Kubernetes monitor 8 type Config struct { // nolint 9 Kubeconfig string 10 Nodename string 11 EnableHostPods bool 12 Workers int 13 14 MetadataExtractor extractors.PodMetadataExtractor 15 NetclsProgrammer extractors.PodNetclsProgrammer 16 PidsSetMaxProcsProgrammer extractors.PodPidsSetMaxProcsProgrammer 17 ResetNetcls extractors.ResetNetclsKubepods 18 SandboxExtractor extractors.PodSandboxExtractor 19 } 20 21 // DefaultConfig provides a default configuration 22 func DefaultConfig() *Config { 23 return &Config{ 24 MetadataExtractor: nil, 25 NetclsProgrammer: nil, 26 PidsSetMaxProcsProgrammer: nil, 27 ResetNetcls: nil, 28 SandboxExtractor: nil, 29 EnableHostPods: false, 30 Kubeconfig: "", 31 Nodename: "", 32 Workers: 4, 33 } 34 } 35 36 // SetupDefaultConfig adds defaults to a partial configuration 37 func SetupDefaultConfig(kubernetesConfig *Config) *Config { 38 return kubernetesConfig 39 }