Documentation ¶
Overview ¶
Package exposition implements the reflection logic for services, endpointslices and ingresses.
Index ¶
- Constants
- func NewEndpointSliceReflector(ipamclient ipam.IpamClient, localPodCIDR string, ...) manager.Reflector
- func NewIngressReflector(reflectorConfig *generic.ReflectorConfig, enableIngress bool, ...) manager.Reflector
- func NewNamespacedEndpointSliceReflector(ipamclient ipam.IpamClient, localPodCIDR string) func(*options.NamespacedOpts) manager.NamespacedReflector
- func NewNamespacedIngressReflector(enableIngress bool, remoteRealIngressClassName string) func(*options.NamespacedOpts) manager.NamespacedReflector
- func NewNamespacedServiceReflector(enableLoadBalancer bool, remoteRealLoadBalancerClassName string) func(*options.NamespacedOpts) manager.NamespacedReflector
- func NewServiceReflector(reflectorConfig *generic.ReflectorConfig, enableLoadBalancer bool, ...) manager.Reflector
- type NamespacedEndpointSliceReflector
- func (ner *NamespacedEndpointSliceReflector) Handle(ctx context.Context, name string) error
- func (ner *NamespacedEndpointSliceReflector) List() ([]interface{}, error)
- func (ner *NamespacedEndpointSliceReflector) MapEndpointIPFromIPResource(original string) (string, error)
- func (ner *NamespacedEndpointSliceReflector) MapEndpointIPs(endpointslice string, originals []string) ([]string, error)
- func (ner *NamespacedEndpointSliceReflector) ServiceToEndpointSlicesKeyer(metadata metav1.Object) []types.NamespacedName
- func (ner *NamespacedEndpointSliceReflector) ShouldSkipReflection(obj metav1.Object) (bool, error)
- func (ner *NamespacedEndpointSliceReflector) ShouldUpdateShadowEndpointSlice(ctx context.Context, remote, target *vkv1alpha1.ShadowEndpointSlice) bool
- func (ner *NamespacedEndpointSliceReflector) UnmapEndpointIPs(ctx context.Context, endpointslice string) error
- type NamespacedIngressReflector
- type NamespacedServiceReflector
Constants ¶
const (
// EndpointSliceReflectorName -> The name associated with the EndpointSlice reflector.
EndpointSliceReflectorName = "EndpointSlice"
)
const (
// IngressReflectorName -> The name associated with the Ingress reflector.
IngressReflectorName = "Ingress"
)
const (
// ServiceReflectorName -> The name associated with the Service reflector.
ServiceReflectorName = "Service"
)
Variables ¶
This section is empty.
Functions ¶
func NewEndpointSliceReflector ¶
func NewEndpointSliceReflector(ipamclient ipam.IpamClient, localPodCIDR string, 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, localPodCIDR string) 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 ¶
func (ner *NamespacedEndpointSliceReflector) Handle(ctx context.Context, name string) error
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) MapEndpointIPFromIPResource ¶
func (ner *NamespacedEndpointSliceReflector) MapEndpointIPFromIPResource(original string) (string, error)
MapEndpointIPFromIPResource maps an IP string using an IP resource.
func (*NamespacedEndpointSliceReflector) MapEndpointIPs ¶
func (ner *NamespacedEndpointSliceReflector) MapEndpointIPs(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.