confmap

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateConfMap added in v0.9.0

func UpdateConfMap(mapDir string, v *TetragonConfValue) error

UpdateConfMap updates the configuration map with the provided value

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
}

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 added in v0.8.4

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

Jump to

Keyboard shortcuts

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