Documentation ¶
Overview ¶
Package endpointslice contains the core logic of endpointslice controller.
Index ¶
- func ServiceControllerKey(endpointSlice *discovery.EndpointSlice) (string, error)
- type Reconciler
- func (r *Reconciler) DeleteService(namespace, name string)
- func (r *Reconciler) GetControllerName() string
- func (r *Reconciler) ManagedByChanged(endpointSlice1, endpointSlice2 *discovery.EndpointSlice) bool
- func (r *Reconciler) ManagedByController(endpointSlice *discovery.EndpointSlice) bool
- func (r *Reconciler) Reconcile(logger klog.Logger, service *corev1.Service, pods []*corev1.Pod, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServiceControllerKey ¶
func ServiceControllerKey(endpointSlice *discovery.EndpointSlice) (string, error)
ServiceControllerKey returns a controller key for a Service but derived from an EndpointSlice.
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is responsible for transforming current EndpointSlice state into desired state
func NewReconciler ¶
func NewReconciler(client clientset.Interface, nodeLister corelisters.NodeLister, maxEndpointsPerSlice int32, endpointSliceTracker *endpointsliceutil.EndpointSliceTracker, topologyCache *topologycache.TopologyCache, eventRecorder record.EventRecorder, controllerName string) *Reconciler
func (*Reconciler) DeleteService ¶
func (r *Reconciler) DeleteService(namespace, name string)
func (*Reconciler) GetControllerName ¶
func (r *Reconciler) GetControllerName() string
func (*Reconciler) ManagedByChanged ¶
func (r *Reconciler) ManagedByChanged(endpointSlice1, endpointSlice2 *discovery.EndpointSlice) bool
ManagedByChanged returns true if one of the provided EndpointSlices is managed by the EndpointSlice controller while the other is not.
func (*Reconciler) ManagedByController ¶
func (r *Reconciler) ManagedByController(endpointSlice *discovery.EndpointSlice) bool
ManagedByController returns true if the controller of the provided EndpointSlices is the EndpointSlice controller.
func (*Reconciler) Reconcile ¶
func (r *Reconciler) Reconcile(logger klog.Logger, service *corev1.Service, pods []*corev1.Pod, existingSlices []*discovery.EndpointSlice, triggerTime time.Time) error
Reconcile takes a set of pods currently matching a service selector and compares them with the endpoints already present in any existing endpoint slices for the given service. It creates, updates, or deletes endpoint slices to ensure the desired set of pods are represented by endpoint slices.