endpointgc

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// LabelOutcome indicates whether the outcome of the operation was successful or not
	LabelOutcome = "outcome"

	// LabelValueOutcomeSuccess is used as a successful outcome of an operation
	LabelValueOutcomeSuccess = "success"

	// LabelValueOutcomeFail is used as an unsuccessful outcome of an operation
	LabelValueOutcomeFail = "fail"
)

Variables

View Source
var Cell = cell.Module(
	"k8s-endpoints-gc",
	"Cilium endpoints garbage collector",

	cell.Config(defaultConfig),

	cell.Invoke(registerGC),

	metrics.Metric(NewMetrics),
)

Cell is a cell that implements a periodic and one-off Cilium endpoints garbage collector. The GC loops through all the Cilium Endpoints in the cluster and validates which one of them should be deleted. Then deleting all that should be deleted.

Functions

func CheckForCiliumEndpointCRD added in v1.19.0

func CheckForCiliumEndpointCRD(ctx cell.HookContext, clientset k8sClient.Clientset, logger *slog.Logger) bool

Types

type Config added in v1.20.0

type Config struct {
	// CiliumEndpointGCInterval is the interval between attempts of the CEP GC controller.
	CiliumEndpointGCInterval time.Duration
}

Config contains the configuration for the endpoint GC cell.

func (Config) Flags added in v1.20.0

func (def Config) Flags(flags *pflag.FlagSet)

Flags registers the flags for Config.

type GC

type GC struct {
	// contains filtered or unexported fields
}

GC represents the Cilium endpoints periodic and one-off GC.

func (*GC) Start

func (g *GC) Start(ctx cell.HookContext) error

func (*GC) Stop

func (g *GC) Stop(ctx cell.HookContext) error

type Metrics

type Metrics struct {
	EndpointGCObjects metric.Vec[metric.Counter]
}

func NewMetrics

func NewMetrics() *Metrics

type SharedConfig

type SharedConfig struct {
	// DisableCiliumEndpointCRD disables the use of CiliumEndpoint CRD
	DisableCiliumEndpointCRD bool
}

SharedConfig contains the configuration that is shared between this module and others. It is a temporary solution meant to avoid polluting this module with a direct dependency on global operator and daemon configurations.

Jump to

Keyboard shortcuts

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