kubecache

package
v2.0.3-alloy Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	LogLevel:             "info",
	Port:                 50055,
	MaxConnections:       100,
	InformerResyncPeriod: 30 * time.Minute,
	ProfilePort:          0,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	// LogLevel can be one of: debug, info, warn, error
	LogLevel string `yaml:"log_level" env:"BEYLA_K8S_CACHE_LOG_LEVEL"`
	// Port where the service is going to listen to
	Port int `yaml:"port" env:"BEYLA_K8S_CACHE_PORT"`
	// MaxConnection is the maximum number of concurrent clients that the service can handle at the same time
	MaxConnections int `yaml:"max_connections" env:"BEYLA_K8S_CACHE_MAX_CONNECTIONS"`
	// ProfilePort is the port where the pprof server is going to listen to. 0 (default) means disabled
	ProfilePort int `yaml:"profile_port" env:"BEYLA_K8S_CACHE_PROFILE_PORT"`
	// InformerResyncPeriod is the time interval between complete resyncs of the informers
	InformerResyncPeriod time.Duration `yaml:"informer_resync_period" env:"BEYLA_K8S_CACHE_INFORMER_RESYNC_PERIOD"`

	InternalMetrics instrument.InternalMetricsConfig `yaml:"internal_metrics"`
}

Config options of the Kubernetes Cache service. Check the "DefaultConfig" variable for a view of the default values.

func LoadConfig

func LoadConfig(file io.Reader) (*Config, error)

LoadConfig overrides configuration in the following order (from less to most priority) 1 - Default configuration (DefaultConfig variable) 2 - Contents of the provided file reader (nillable) 3 - Environment variables

Directories

Path Synopsis
cni
This implementation is a derivation of the code in https://github.com/netobserv/netobserv-ebpf-agent/tree/release-1.4
This implementation is a derivation of the code in https://github.com/netobserv/netobserv-ebpf-agent/tree/release-1.4

Jump to

Keyboard shortcuts

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