endpointslice

package
v0.0.0-...-265eb5a Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpointSlice

func GetEndpointSlice(
	service *v1.Service,
	pods *v1.PodList,
	addressType v1discovery.AddressType,
	networks []*v1alpha1.Network,
	getIPsFunc GetIPs,
) (*v1discovery.EndpointSlice, error)

func GetEndpointSliceName

func GetEndpointSliceName(service *v1.Service, addressType v1discovery.AddressType) string

GetEndpointSliceName concatenates the service name and the address type (ip family).

func MergeEndpointSlices

func MergeEndpointSlices(
	endpointSliceA *v1discovery.EndpointSlice,
	endpointSliceB *v1discovery.EndpointSlice,
) *v1discovery.EndpointSlice

MergeEndpointSlices merges two endpoint slices address and keep the data from endpointSliceA if endpointSliceA and endpointSliceB data are not corresponding.

func SplitEndpointSlices

func SplitEndpointSlices(
	endpointSlice *v1discovery.EndpointSlice,
) (*v1discovery.EndpointSlice, *v1discovery.EndpointSlice)

SplitEndpointSlices splits an endpoint slice into 2 (ipv4 and ipv6) Only endpoints are kept.

Types

type GetIPs

type GetIPs func(pod v1.Pod, networks []*v1alpha1.Network) ([]string, error)

GetIPs represents the function to get the IPs assigned to a pod for a specific network.

Jump to

Keyboard shortcuts

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