endpointslicesync

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"endpointslicesync-clustermesh",
	"EndpointSlice clustermesh synchronization in the Cilium operator",
	cell.Config(EndpointSliceSyncConfig{}),
	cell.Invoke(registerEndpointSliceSync),

	metrics.Metric(NewMetrics),
)

Cell is the cell for the Operator ClusterMesh

Functions

func NewMeshEndpointSliceWatcher

func NewMeshEndpointSliceWatcher(backend watch.Interface) *meshEndpointSliceWatcher

Types

type EndpointSliceSyncConfig

type EndpointSliceSyncConfig struct {
	// ClusterMeshConcurrentEndpointSync the number of service endpoint syncing operations
	// that will be done concurrently by the EndpointSlice Cluster Mesh controller.
	ClusterMeshConcurrentEndpointSync int `mapstructure:"clustermesh-concurrent-service-endpoint-syncs"`
	// ClusterMeshEndpointUpdatesBatchPeriod describes the length of endpoint updates batching period.
	// Processing of cluster service changes will be delayed by this duration to join them with potential
	// upcoming updates and reduce the overall number of endpoints updates.
	ClusterMeshEndpointUpdatesBatchPeriod time.Duration `mapstructure:"clustermesh-endpoint-updates-batch-period"`
	// ClusterMeshEndpointsPerSlice is the maximum number of endpoints that
	// will be added to an EndpointSlice synced from a remote cluster.
	// More endpoints per slice will result in less endpoint slices, but larger resources. Defaults to 100.
	ClusterMeshMaxEndpointsPerSlice int `mapstructure:"clustermesh-endpoints-per-slice"`
}

EndpointSliceSyncConfig contains the configuration for endpointSliceSync inside the operator.

func (EndpointSliceSyncConfig) Flags

func (cfg EndpointSliceSyncConfig) Flags(flags *pflag.FlagSet)

Flags adds the flags used by ClientConfig.

type Metrics

type Metrics struct {
	// EndpointsAddedPerSync tracks the number of endpoints added on each
	// Service sync.
	EndpointsAddedPerSync metric.Vec[metric.Observer]
	// EndpointsRemovedPerSync tracks the number of endpoints removed on each
	// Service sync.
	EndpointsRemovedPerSync metric.Vec[metric.Observer]
	// EndpointSlicesChangedPerSync observes the number of EndpointSlices
	// changed per sync.
	EndpointSlicesChangedPerSync metric.Vec[metric.Observer]
	// EndpointSliceChanges tracks the number of changes to Endpoint Slices.
	EndpointSliceChanges metric.Vec[metric.Counter]
	// EndpointSliceSyncs tracks the number of sync operations the controller
	// runs along with their result.
	EndpointSliceSyncs metric.Vec[metric.Counter]
	// NumEndpointSlices tracks the number of EndpointSlices in a cluster.
	NumEndpointSlices metric.Vec[metric.Gauge]
	// DesiredEndpointSlices tracks the number of EndpointSlices that would
	// exist with perfect endpoint allocation.
	DesiredEndpointSlices metric.Vec[metric.Gauge]
	// EndpointsDesired tracks the total number of desired endpoints.
	EndpointsDesired metric.Vec[metric.Gauge]
}

func NewMetrics

func NewMetrics() Metrics

Jump to

Keyboard shortcuts

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