Documentation
¶
Index ¶
Constants ¶
const EndpointSliceControllerName = "endpointslice-controller"
EndpointSliceControllerName is the controller name that will be used when reporting events and metrics.
const ServiceExportControllerName = "service-export-controller"
ServiceExportControllerName is the controller name that will be used when reporting events and metrics.
const ServiceImportControllerName = "service-import-controller"
ServiceImportControllerName is the controller name that will be used when reporting events and metrics.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointSliceController ¶
type EndpointSliceController struct {
client.Client
EventRecorder record.EventRecorder
RateLimiterOptions ratelimiterflag.Options
}
EndpointSliceController is to collect EndpointSlice which reported by member cluster from executionNamespace to serviceexport namespace.
func (*EndpointSliceController) Reconcile ¶
func (c *EndpointSliceController) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
Reconcile performs a full reconciliation for the object referred to by the Request.
func (*EndpointSliceController) SetupWithManager ¶
func (c *EndpointSliceController) SetupWithManager(mgr controllerruntime.Manager) error
SetupWithManager creates a controller and register to controller manager.
type ServiceExportController ¶
type ServiceExportController struct {
client.Client
EventRecorder record.EventRecorder
RESTMapper meta.RESTMapper
Context context.Context
InformerManager genericmanager.MultiClusterInformerManager
WorkerNumber int // WorkerNumber is the number of worker goroutines
PredicateFunc predicate.Predicate // PredicateFunc is the function that filters events before enqueuing the keys.
ClusterDynamicClientSetFunc util.NewClusterDynamicClientSetFunc
ClusterClientOption *util.ClientOption
ClusterCacheSyncTimeout metav1.Duration
RateLimiterOptions ratelimiterflag.Options
// contains filtered or unexported fields
}
ServiceExportController is to sync ServiceExport and report EndpointSlices of exported service to control-plane. It creates Informers for clusters where ServiceExport resources have been propagated, registers EventHandlers for ServiceExport and EndpointSlice in those clusters, and then asynchronously processes ServiceExport and EndpointSlice events.
func (*ServiceExportController) Reconcile ¶
func (c *ServiceExportController) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
Reconcile performs a full reconciliation for the object referred to by the Request.
func (*ServiceExportController) RunWorkQueue ¶
func (c *ServiceExportController) RunWorkQueue()
RunWorkQueue initializes worker and run it, worker will process resource asynchronously.
func (*ServiceExportController) SetupWithManager ¶
func (c *ServiceExportController) SetupWithManager(mgr controllerruntime.Manager) error
SetupWithManager creates a controller and register to controller manager.
type ServiceImportController ¶
type ServiceImportController struct {
client.Client
EventRecorder record.EventRecorder
RateLimiterOptions ratelimiterflag.Options
}
ServiceImportController is to sync derived service from ServiceImport.
func (*ServiceImportController) Reconcile ¶
func (c *ServiceImportController) Reconcile(ctx context.Context, req controllerruntime.Request) (controllerruntime.Result, error)
Reconcile performs a full reconciliation for the object referred to by the Request.
func (*ServiceImportController) SetupWithManager ¶
func (c *ServiceImportController) SetupWithManager(mgr controllerruntime.Manager) error
SetupWithManager creates a controller and register to controller manager.