utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectNetworkAttachmentOfNode

func DetectNetworkAttachmentOfNode(client client.Reader, node *corev1.Node) (underlayAttached, overlayAttached bool, err error)

func FindOverlayNetwork

func FindOverlayNetwork(client client.Reader) (overlayNetworkName string, err error)

func FindOverlayNetworkNetID

func FindOverlayNetworkNetID(client client.Reader) (*int32, error)

func FindUnderlayNetworkForNode

func FindUnderlayNetworkForNode(client client.Reader, nodeLabels map[string]string) (underlayNetworkName string, err error)

func FindUnderlayNetworkForNodeName

func FindUnderlayNetworkForNodeName(client client.Reader, nodeName string) (underlayNetworkName string, err error)

func GetClusterUUID

func GetClusterUUID(c client.Reader) (types.UID, error)

func GetIPOfPod

func GetIPOfPod(c client.Reader, pod *corev1.Pod) (string, error)

func GetIndexFromName

func GetIndexFromName(name string) int

func GetNetwork

func GetNetwork(client client.Reader, name string) (*networkingv1.Network, error)

func GetRemoteCluster

func GetRemoteCluster(client client.Reader, name string) (*multiclusterv1.RemoteCluster, error)

func GetSubnet

func GetSubnet(client client.Reader, name string) (*networkingv1.Subnet, error)

func ListAllocatedIPInstancesOfPod

func ListAllocatedIPInstancesOfPod(c client.Reader, pod *corev1.Pod) (ips []*networkingv1.IPInstance, err error)

func ListIPInstances

func ListIPInstances(client client.Reader, opts ...client.ListOption) (*networkingv1.IPInstanceList, error)

func ListIPsOfPod

func ListIPsOfPod(c client.Reader, pod *corev1.Pod) ([]string, error)

func ListNetworks

func ListNetworks(client client.Reader, opts ...client.ListOption) (*networkingv1.NetworkList, error)

func ListNodesToNames

func ListNodesToNames(client client.Reader, opts ...client.ListOption) ([]string, error)

func ListRemoteClusters

func ListRemoteClusters(client client.Reader, opts ...client.ListOption) (*multiclusterv1.RemoteClusterList, error)

func ListRemoteSubnets

func ListRemoteSubnets(client client.Reader, opts ...client.ListOption) (*multiclusterv1.RemoteSubnetList, error)

func ListRemoteVteps

func ListRemoteVteps(client client.Reader, opts ...client.ListOption) (*multiclusterv1.RemoteVtepList, error)

func ListSubnets

func ListSubnets(client client.Reader, opts ...client.ListOption) (*networkingv1.SubnetList, error)

func ListSubnetsToNames

func ListSubnetsToNames(client client.Reader, opts ...client.ListOption) ([]string, error)

func NewRestConfigFromRemoteCluster

func NewRestConfigFromRemoteCluster(remoteCluster *multiclusterv1.RemoteCluster) (*rest.Config, error)

func PodIsCompleted

func PodIsCompleted(pod *v1.Pod) bool

func PodIsEvicted

func PodIsEvicted(pod *v1.Pod) bool

func ToIPFamilyMode

func ToIPFamilyMode(isIPv6 bool) types.IPFamilyMode

func ToIPFormat

func ToIPFormat(name string) string

func ToIPFormatWithFamily

func ToIPFormatWithFamily(name string) (string, bool)

Types

type IPInstancePhaseChangePredicate

type IPInstancePhaseChangePredicate struct {
	predicate.Funcs
}

func (IPInstancePhaseChangePredicate) Update

Update implements default UpdateEvent filter for checking whether IPInstance phase change

type IgnoreDeletePredicate

type IgnoreDeletePredicate struct {
	predicate.Funcs
}

IgnoreDeletePredicate will ignore the delete event, if finalizer is used, this predicate will help to reduce reconciliation count

func (IgnoreDeletePredicate) Delete

type IgnoreUpdatePredicate

type IgnoreUpdatePredicate struct {
	predicate.Funcs
}

IgnoreUpdatePredicate will ignore the update event

func (IgnoreUpdatePredicate) Update

type NetworkOfNodeChangePredicate

type NetworkOfNodeChangePredicate struct {
	Client client.Client
	predicate.Funcs
}

func (NetworkOfNodeChangePredicate) Update

type NetworkSpecChangePredicate

type NetworkSpecChangePredicate struct {
	predicate.Funcs
}

func (NetworkSpecChangePredicate) Update

type NetworkStatusChangePredicate

type NetworkStatusChangePredicate struct {
	predicate.Funcs
}

func (NetworkStatusChangePredicate) Update

type RemoteClusterUUIDChangePredicate

type RemoteClusterUUIDChangePredicate struct {
	predicate.Funcs
}

func (RemoteClusterUUIDChangePredicate) Update

type SpecifiedAnnotationChangedPredicate

type SpecifiedAnnotationChangedPredicate struct {
	predicate.Funcs
	AnnotationKeys []string
}

func (SpecifiedAnnotationChangedPredicate) Update

Update implements default UpdateEvent filter for validating specified annotations change

type SpecifiedLabelChangedPredicate

type SpecifiedLabelChangedPredicate struct {
	predicate.Funcs
	LabelKeys []string
}

func (SpecifiedLabelChangedPredicate) Update

Update implements default UpdateEvent filter for validating specified annotations change

type SubnetSpecChangePredicate

type SubnetSpecChangePredicate struct {
	predicate.Funcs
}

func (SubnetSpecChangePredicate) Update

type TerminatingPredicate

type TerminatingPredicate struct {
	predicate.Funcs
}

func (TerminatingPredicate) Create

func (TerminatingPredicate) Update

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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