common

package
v0.1.0-rc6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KindDeployment  = "Deployment"
	KindDaemonSet   = "DaemonSet"
	KindStatefulSet = "StatefulSet"
	KindCronJob     = "CronJob"
	KindJob         = "Job"
)

Variables

View Source
var (
	ErrPodNetworkStatusNotUpdated = fmt.Errorf("pod network status not updated by multus")
)

Functions

func CheckPodAnnotationIPs

func CheckPodAnnotationIPs(s string) ([]net.IP, error)

func CheckPodAnnotationMACs

func CheckPodAnnotationMACs(s string) ([]string, error)

func CheckSubnetConflict

func CheckSubnetConflict(
	subnet *flv1.FlatNetworkSubnet, subnets []*flv1.FlatNetworkSubnet,
) error

func CheckSubnetFlatMode

func CheckSubnetFlatMode(
	subnet *flv1.FlatNetworkSubnet, subnets []*flv1.FlatNetworkSubnet,
) error

func GetWorkloadKind

func GetWorkloadKind(w metav1.Object) string

func GetWorkloadReservdIPKey

func GetWorkloadReservdIPKey(w metav1.Object) string

func ValidateSubnet

func ValidateSubnet(subnet *flv1.FlatNetworkSubnet) error

Types

type EndpointReource

type EndpointReource struct {
	Subsets       []corev1.EndpointSubset
	Endpoints     []discoveryv1.Endpoint
	EndpointPorts []discoveryv1.EndpointPort
}

func GetEndpointResources

func GetEndpointResources(
	svc *corev1.Service, pods []*corev1.Pod,
) (*EndpointReource, error)

GetEndpointResources gets CoreV1 Endpoint Subsets and DiscoveryV1 EndpointSlice resources by pods.

func (*EndpointReource) GetEndpointSliceAddressType

func (r *EndpointReource) GetEndpointSliceAddressType() (discoveryv1.AddressType, error)

Jump to

Keyboard shortcuts

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