exposition

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 26 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, workers uint) manager.Reflector

NewEndpointSliceReflector returns a new EndpointSliceReflector instance.

func NewIngressReflector added in v0.5.0

func NewIngressReflector(workers uint) 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(opts *options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedIngressReflector returns a new NamespacedIngressReflector instance.

func NewNamespacedServiceReflector

func NewNamespacedServiceReflector(opts *options.NamespacedOpts) manager.NamespacedReflector

NewNamespacedServiceReflector returns a new NamespacedServiceReflector instance.

func NewServiceReflector

func NewServiceReflector(workers uint) 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) 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

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

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.

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.

Jump to

Keyboard shortcuts

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