configmap

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 18

Documentation

Overview

Package config stores runtime configuration state for the Cilium datapath. +groupName=maps

Index

Constants

View Source
const (
	// MapName name of map used to pin map for datapath
	MapName = "cilium_runtime_config"

	// MaxEntries represents the maximum number of config entries.
	// Initially defined as 256, so that downgrade from a future version having more than one
	// entry works without necessarily resizing the map. Entries not known by the datapath
	// version are simply ignored.
	MaxEntries = 256
)

Variables

View Source
var Cell = cell.Module(
	"config-map",
	"eBPF map config contains runtime configuration state for the Cilium datapath",

	cell.Provide(newMap),
)

Cell initializes and manages the config map.

Functions

This section is empty.

Types

type Index

type Index uint32

Index is the index to the runtime config array.

const (
	UTimeOffset Index = iota
	AgentLiveness
)

All supported indices in one place. Must be in sync with RUNTIME_CONFIG_ enum in bpf/lib/common.h

func (*Index) New

func (k *Index) New() bpf.MapKey

func (Index) String

func (r Index) String() string

String pretty print the Index

type Map

type Map interface {
	// Update writes the given uint64 value to the bpf map at the given index.
	Update(index Index, val uint64) error

	Get(index Index) (uint64, error)
}

Map provides access to the eBPF map configmap.

func LoadMap

func LoadMap() (Map, error)

LoadMap loads the pre-initialized config map for access. This should only be used from components which aren't capable of using hive - mainly the Cilium CLI. It needs to initialized beforehand via the Cilium Agent.

type Value

type Value uint64

Value is the generic datapath runtime config value.

func (*Value) New

func (v *Value) New() bpf.MapValue

func (*Value) String

func (v *Value) String() string

String pretty print the config Value.

Jump to

Keyboard shortcuts

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