-
Notifications
You must be signed in to change notification settings - Fork 51
/
config.go
39 lines (34 loc) · 1.08 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package podmonitor
import (
"go.aporeto.io/trireme-lib/monitor/extractors"
)
// Config is the config for the Kubernetes monitor
type Config struct { // nolint
Kubeconfig string
Nodename string
EnableHostPods bool
Workers int
MetadataExtractor extractors.PodMetadataExtractor
NetclsProgrammer extractors.PodNetclsProgrammer
PidsSetMaxProcsProgrammer extractors.PodPidsSetMaxProcsProgrammer
ResetNetcls extractors.ResetNetclsKubepods
SandboxExtractor extractors.PodSandboxExtractor
}
// DefaultConfig provides a default configuration
func DefaultConfig() *Config {
return &Config{
MetadataExtractor: nil,
NetclsProgrammer: nil,
PidsSetMaxProcsProgrammer: nil,
ResetNetcls: nil,
SandboxExtractor: nil,
EnableHostPods: false,
Kubeconfig: "",
Nodename: "",
Workers: 4,
}
}
// SetupDefaultConfig adds defaults to a partial configuration
func SetupDefaultConfig(kubernetesConfig *Config) *Config {
return kubernetesConfig
}