identitygc

package
v1.14.10 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Interval is the interval in which allocator identities are
	// attempted to be collected
	Interval = "identity-gc-interval"

	// RateInterval is the interval used for rate limiting the GC of
	// identities.
	RateInterval = "identity-gc-rate-interval"

	// RateLimit is the maximum identities used for rate limiting the
	// GC of identities.
	RateLimit = "identity-gc-rate-limit"

	// HeartbeatTimeout is the timeout used to GC identities from k8s
	HeartbeatTimeout = "identity-heartbeat-timeout"
)

Variables

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

	cell.Config(defaultConfig),

	cell.Invoke(registerGC),
)

Cell is a cell that implements a periodic Cilium identities garbage collector. The GC subscribes to identities events to mark all the related identities as alive. If an identity has no activity for a prolonged interval, it is first marked for deletion and eventually deleted.

Functions

This section is empty.

Types

type Config

type Config struct {
	Interval         time.Duration `mapstructure:"identity-gc-interval"`
	HeartbeatTimeout time.Duration `mapstructure:"identity-heartbeat-timeout"`

	RateInterval time.Duration `mapstructure:"identity-gc-rate-interval"`
	RateLimit    int64         `mapstructure:"identity-gc-rate-limit"`
}

Config contains the configuration for the identity-gc.

func (Config) Flags

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

type GC

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

GC represents the Cilium identities periodic GC.

type SharedConfig

type SharedConfig struct {
	// IdentityAllocationMode specifies what mode to use for identity allocation
	IdentityAllocationMode string

	// EnableMetrics enables prometheus metrics
	EnableMetrics bool

	// ClusterName is the name of the cluster
	ClusterName string

	// K8sNamespace is the name of the namespace in which Cilium is
	// deployed in when running in Kubernetes mode
	K8sNamespace string

	// ClusterID is the unique identifier of the cluster
	ClusterID uint32
}

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