Documentation
¶
Overview ¶
Package option provides global singletons for storing configuration and variables used in Tetragon.
Index ¶
- Constants
- Variables
- func AddFlags(flags *pflag.FlagSet)
- func ParseMetricsLabelFilter(labels string) map[string]interface{}
- func ReadAndSetFlags() error
- func ReadConfigDir(path string) error
- func ReadConfigFile(path string, file string) error
- func ReadDirConfig(dirName string) (map[string]interface{}, error)
Constants ¶
View Source
const ( KeyConfigDir = "config-dir" KeyDebug = "debug" KeyHubbleLib = "bpf-lib" KeyBTF = "btf" KeyProcFS = "procfs" KeyKernelVersion = "kernel" KeyVerbosity = "verbose" KeyProcessCacheSize = "process-cache-size" KeyDataCacheSize = "data-cache-size" KeyForceSmallProgs = "force-small-progs" KeyForceLargeProgs = "force-large-progs" KeyLogLevel = "log-level" KeyLogFormat = "log-format" KeyEnableK8sAPI = "enable-k8s-api" KeyK8sKubeConfigPath = "k8s-kubeconfig-path" KeyEnableProcessAncestors = "enable-process-ancestors" KeyMetricsServer = "metrics-server" KeyMetricsLabelFilter = "metrics-label-filter" KeyServerAddress = "server-address" KeyGopsAddr = "gops-address" KeyEnableProcessCred = "enable-process-cred" KeyEnableProcessNs = "enable-process-ns" KeyTracingPolicy = "tracing-policy" KeyTracingPolicyDir = "tracing-policy-dir" KeyCpuProfile = "cpuprofile" KeyMemProfile = "memprofile" KeyPprofAddr = "pprof-addr" KeyExportFilename = "export-filename" KeyExportFileMaxSizeMB = "export-file-max-size-mb" KeyExportFileRotationInterval = "export-file-rotation-interval" KeyExportFileMaxBackups = "export-file-max-backups" KeyExportFileCompress = "export-file-compress" KeyExportRateLimit = "export-rate-limit" KeyExportFilePerm = "export-file-perm" KeyEnableExportAggregation = "enable-export-aggregation" KeyExportAggregationWindowSize = "export-aggregation-window-size" KeyExportAggregationBufferSize = "export-aggregation-buffer-size" KeyExportAllowlist = "export-allowlist" KeyExportDenylist = "export-denylist" KeyFieldFilters = "field-filters" KeyNetnsDir = "netns-dir" KeyDisableKprobeMulti = "disable-kprobe-multi" KeyRBSize = "rb-size" KeyRBSizeTotal = "rb-size-total" KeyRBQueueSize = "rb-queue-size" KeyEventQueueSize = "event-queue-size" KeyReleasePinnedBPF = "release-pinned-bpf" KeyEnablePolicyFilter = "enable-policy-filter" KeyEnablePolicyFilterDebug = "enable-policy-filter-debug" KeyEnablePidSetFilter = "enable-pid-set-filter" KeyEnableMsgHandlingLatency = "enable-msg-handling-latency" KeyKmods = "kmods" KeyEnablePodInfo = "enable-pod-info" KeyExposeKernelAddresses = "expose-kernel-addresses" )
Variables ¶
View Source
var ( // Config contains all the configuration used by Tetragon. Config = config{ ProcFS: "/proc", LogOpts: make(map[string]string), MetricsLabelFilter: func() map[string]interface{} { result := make(map[string]interface{}) for _, label := range consts.KnownMetricLabelFilters { result[label] = nil } return result }(), } )
View Source
var Vars vars
Functions ¶
func ParseMetricsLabelFilter ¶ added in v1.0.0
func ReadAndSetFlags ¶ added in v1.0.0
func ReadAndSetFlags() error
func ReadConfigDir ¶ added in v0.11.0
func ReadConfigFile ¶ added in v0.11.0
func ReadDirConfig ¶
ReadDirConfig reads the given directory and returns a map that maps the filename to the contents of that file.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.