option

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package option provides global singletons for storing configuration and variables used in Tetragon.

Index

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 AddFlags added in v1.0.0

func AddFlags(flags *pflag.FlagSet)

func ParseMetricsLabelFilter added in v1.0.0

func ParseMetricsLabelFilter(labels string) map[string]interface{}

func ReadAndSetFlags added in v1.0.0

func ReadAndSetFlags() error

func ReadConfigDir added in v0.11.0

func ReadConfigDir(path string) error

func ReadConfigFile added in v0.11.0

func ReadConfigFile(path string, file string) error

func ReadDirConfig

func ReadDirConfig(dirName string) (map[string]interface{}, error)

ReadDirConfig reads the given directory and returns a map that maps the filename to the contents of that file.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL