confmap

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateTgRuntimeConf

func UpdateTgRuntimeConf(mapDir string, nspid int) error

UpdateTgRuntimeConf() Gathers information about Tetragon runtime environment and update the TetragonConfMap that is the BPF `tg_conf_map`.

It detects the CgroupFS magic, Cgroup runtime mode, discovers cgroup css's that registered during boot and propagated to all tasks inside their css_set, detects the deployment mode from kubernetes, containers, to standalone or systemd services. All discovered information will also be logged for debugging purpose.

On failures it returns an error, and it default prints a warning that advanced Cgroups tracking will be disabled which will affect process association with kubernetes pods and containers.

Important: this function does not take extra arguments as it should auto detect environment without any help. For testing use the specific variant that can be tuned with specific argument values.

Types

type TetragonConfKey

type TetragonConfKey struct {
	Key uint32
}

func (*TetragonConfKey) DeepCopyMapKey

func (k *TetragonConfKey) DeepCopyMapKey() bpf.MapKey

func (*TetragonConfKey) GetKeyPtr

func (k *TetragonConfKey) GetKeyPtr() unsafe.Pointer

func (*TetragonConfKey) NewValue

func (k *TetragonConfKey) NewValue() bpf.MapValue

func (*TetragonConfKey) String

func (k *TetragonConfKey) String() string

type TetragonConfValue

type TetragonConfValue struct {
	LogLevel        uint32 `align:"loglevel"`           // Tetragon log level
	PID             uint32 `align:"pid"`                // Tetragon PID for debugging purpose
	NSPID           uint32 `align:"nspid"`              // Tetragon PID in namespace for debugging purpose
	TgCgrpHierarchy uint32 `align:"tg_cgrp_hierarchy"`  // Tetragon Cgroup tracking hierarchy ID
	TgCgrpSubsysIdx uint32 `align:"tg_cgrp_subsys_idx"` // Tracking Cgroup css idx at compile time
	TgCgrpLevel     uint32 `align:"tg_cgrp_level"`      // Tetragon cgroup level
	TgCgrpId        uint64 `align:"tg_cgrpid"`          // Tetragon cgroup ID
	CgrpFsMagic     uint64 `align:"cgrp_fs_magic"`      // Cgroupv1 or cgroupv2
}

func ReadTgRuntimeConf

func ReadTgRuntimeConf(mapDir string) (*TetragonConfValue, error)

func (*TetragonConfValue) DeepCopyMapValue

func (v *TetragonConfValue) DeepCopyMapValue() bpf.MapValue

func (*TetragonConfValue) GetValuePtr

func (v *TetragonConfValue) GetValuePtr() unsafe.Pointer

func (*TetragonConfValue) String

func (v *TetragonConfValue) String() string

Jump to

Keyboard shortcuts

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