exposition

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package exposition implements the reflection logic for services, endpointslices and ingresses.

Index

Constants

View Source
const (
	// EndpointSliceReflectorName -> The name associated with the EndpointSlice reflector.
	EndpointSliceReflectorName = "EndpointSlice"
)
View Source
const (
	// IngressReflectorName -> The name associated with the Ingress reflector.
	IngressReflectorName = "Ingress"
)
View Source
const (
	// ServiceReflectorName -> The name associated with the Service reflector.
	ServiceReflectorName = "Service"
)

Variables

This section is empty.

Functions

func NewEndpointSliceReflector

func NewEndpointSliceReflector(ipamclient ipam.IpamClient, reflectorConfig *generic.ReflectorConfig) manager.Reflector

NewEndpointSliceReflector returns a new EndpointSliceReflector instance.

func NewIngressReflector added in v0.5.0

func NewIngressReflector(reflectorConfig *generic.ReflectorConfig,
	enableIngress bool, remoteRealIngressClassName string) manager.Reflector

NewIngressReflector returns a new IngressReflector instance.

func NewNamespacedEndpointSliceReflector

func NewNamespacedEndpointSliceReflector(ipamclient ipam.IpamClient) func(*options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedEndpointSliceReflector returns a function generating NamespacedEndpointSliceReflector instances.

func NewNamespacedIngressReflector added in v0.5.0

func NewNamespacedIngressReflector(enableIngress bool,
	remoteRealIngressClassName string) func(*options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedIngressReflector returns a new NamespacedIngressReflector instance.

func NewNamespacedServiceReflector

func NewNamespacedServiceReflector(
	enableLoadBalancer bool, remoteRealLoadBalancerClassName string) func(*options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedServiceReflector returns a new NamespacedServiceReflector instance.

func NewServiceReflector

func NewServiceReflector(reflectorConfig *generic.ReflectorConfig,
	enableLoadBalancer bool, remoteRealLoadBalancerClassName string) manager.Reflector

NewServiceReflector returns a new ServiceReflector instance.

Types

type NamespacedEndpointSliceReflector

type NamespacedEndpointSliceReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedEndpointSliceReflector manages the EndpointSlice reflection for a given pair of local and remote namespaces.

func (*NamespacedEndpointSliceReflector) Handle

Handle reconciles endpointslice objects.

func (*NamespacedEndpointSliceReflector) List added in v0.9.0

func (ner *NamespacedEndpointSliceReflector) List() ([]interface{}, error)

List returns the list of EndpointSlices managed by informers.

func (*NamespacedEndpointSliceReflector) MapEndpointIPs

func (ner *NamespacedEndpointSliceReflector) MapEndpointIPs(ctx context.Context, endpointslice string, originals []string) ([]string, error)

MapEndpointIPs maps the local set of addresses to the corresponding remote ones.

func (*NamespacedEndpointSliceReflector) ServiceToEndpointSlicesKeyer added in v0.6.0

func (ner *NamespacedEndpointSliceReflector) ServiceToEndpointSlicesKeyer(metadata metav1.Object) []types.NamespacedName

ServiceToEndpointSlicesKeyer returns the NamespacedName of all local EndpointSlices associated with the given local Service.

func (*NamespacedEndpointSliceReflector) ShouldSkipReflection added in v0.6.0

func (ner *NamespacedEndpointSliceReflector) ShouldSkipReflection(obj metav1.Object) (bool, error)

ShouldSkipReflection returns whether the reflection of the given object should be skipped.

func (*NamespacedEndpointSliceReflector) ShouldUpdateShadowEndpointSlice added in v0.8.0

func (ner *NamespacedEndpointSliceReflector) ShouldUpdateShadowEndpointSlice(ctx context.Context,
	remote, target *vkv1alpha1.ShadowEndpointSlice) bool

ShouldUpdateShadowEndpointSlice checks whether it is necessary to update the remote shadowendpointslice, based on the forged one.

func (*NamespacedEndpointSliceReflector) UnmapEndpointIPs

func (ner *NamespacedEndpointSliceReflector) UnmapEndpointIPs(ctx context.Context, endpointslice string) error

UnmapEndpointIPs unmaps the local set of addresses for the given endpointslice and releases the corresponding remote ones.

type NamespacedIngressReflector added in v0.5.0

type NamespacedIngressReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedIngressReflector manages the Ingress reflection for a given pair of local and remote namespaces.

func (*NamespacedIngressReflector) Handle added in v0.5.0

func (nir *NamespacedIngressReflector) Handle(ctx context.Context, name string) error

Handle reconciles ingress objects.

func (*NamespacedIngressReflector) List added in v0.9.0

func (nir *NamespacedIngressReflector) List() ([]interface{}, error)

List returns the list of ingress objects to be reflected.

type NamespacedServiceReflector

type NamespacedServiceReflector struct {
	generic.NamespacedReflector
	// contains filtered or unexported fields
}

NamespacedServiceReflector manages the Service reflection for a given pair of local and remote namespaces.

func (*NamespacedServiceReflector) Handle

func (nsr *NamespacedServiceReflector) Handle(ctx context.Context, name string) error

Handle reconciles service objects.

func (*NamespacedServiceReflector) List added in v0.9.0

func (nsr *NamespacedServiceReflector) List() ([]interface{}, error)

List returns the list of services to be reflected.

Jump to

Keyboard shortcuts

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