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(ClusterMeshConfig{}), cell.Provide( newClusterMesh, newAPIClustersHandler, ), cell.Invoke(func(ClusterMesh) {}), cell.Config(common.Config{}), cell.Config(wait.TimeoutConfigDefault), metrics.Metric(NewMetrics), metrics.Metric(common.MetricsProvider(subsystem)), )
Cell is the cell for the Operator ClusterMesh
Functions ¶
Types ¶
type ClusterMesh ¶
type ClusterMesh interface { // RegisterClusterAddHook register a hook when a cluster is added to the mesh. // This should NOT be called after the Start hook. RegisterClusterAddHook(clusterAddHook func(string)) // RegisterClusterDeleteHook register a hook when a cluster is removed from the mesh. // This should NOT be called after the Start hook. RegisterClusterDeleteHook(clusterDeleteHook func(string)) // RegisterClusterServiceUpdateHook register a hook when a service in the mesh is updated. // This should NOT be called after the Start hook. RegisterClusterServiceUpdateHook(clusterServiceUpdateHook func(*serviceStore.ClusterService)) // RegisterClusterServiceDeleteHook register a hook when a service in the mesh is deleted. // This should NOT be called after the Start hook. RegisterClusterServiceDeleteHook(clusterServiceDeleteHook func(*serviceStore.ClusterService)) ServicesSynced(ctx context.Context) error GlobalServices() *common.GlobalServiceCache }
ClusterMesh is the interface corresponding to the clusterMesh struct to expose its public methods to other Cilium packages.
type ClusterMeshConfig ¶
type ClusterMeshConfig struct { // ClusterMeshEnableEndpointSync enables the EndpointSlice Cluster Mesh synchronization ClusterMeshEnableEndpointSync bool `mapstructure:"clustermesh-enable-endpoint-sync"` // 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"` }
ClusterMeshConfig contains the configuration for ClusterMesh inside the operator.
func (ClusterMeshConfig) Flags ¶
func (cfg ClusterMeshConfig) Flags(flags *pflag.FlagSet)
Flags adds the flags used by ClientConfig.
type Metrics ¶
type Metrics struct { // TotalGlobalServices tracks the total number of global services. TotalGlobalServices metric.Vec[metric.Gauge] // 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
Click to show internal directories.
Click to hide internal directories.