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" )
View Source
const ( // LabelStatus marks the status of a resource or completed task LabelStatus = "status" // 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" // LabelValueOutcomeAlive is used as outcome of alive identity entries LabelValueOutcomeAlive = "alive" // LabelValueOutcomeDeleted is used as outcome of deleted identity entries LabelValueOutcomeDeleted = "deleted" )
Variables ¶
View Source
var Cell = cell.Module( "k8s-identities-gc", "Cilium identities garbage collector", cell.Config(defaultConfig), cell.Invoke(registerGC), cell.Metric(NewMetrics), )
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.
type GC ¶
type GC struct {
// contains filtered or unexported fields
}
GC represents the Cilium identities periodic GC.
type Metrics ¶ added in v1.15.0
type Metrics struct { // IdentityGCSize records the identity GC results IdentityGCSize metric.Vec[metric.Gauge] // IdentityGCRuns records how many times identity GC has run IdentityGCRuns metric.Vec[metric.Gauge] }
func NewMetrics ¶ added in v1.15.0
func NewMetrics() *Metrics
type SharedConfig ¶
type SharedConfig struct { string // deployed in when running in Kubernetes mode K8sNamespace string }IdentityAllocationMode
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.
Click to show internal directories.
Click to hide internal directories.