ready

package
v0.0.0-...-4cb12bb Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDaemonSetIsReady

func CheckDaemonSetIsReady(ctx context.Context, cli appsv1client.DaemonSetInterface, name string) func() (bool, error)

CheckDaemonSetIsReady returns a function which polls a DaemonSet and returns its readiness

func CheckDeploymentIsReady

func CheckDeploymentIsReady(ctx context.Context, cli appsv1client.DeploymentInterface, name string) func() (bool, error)

CheckDeploymentIsReady returns a function which polls a Deployment and returns its readiness

func CheckMachineConfigPoolIsReady

func CheckMachineConfigPoolIsReady(ctx context.Context, cli mcoclientv1.MachineConfigPoolInterface, name string) func() (bool, error)

CheckMachineConfigPoolIsReady returns a function which polls a MachineConfigPool and returns its readiness

func CheckPodIsRunning

func CheckPodIsRunning(ctx context.Context, cli corev1client.PodInterface, name string) func() (bool, error)

CheckPodIsRunning returns a function which polls a Pod and returns if it is running

func CheckPodsAreRunning

func CheckPodsAreRunning(ctx context.Context, cli corev1client.PodInterface, labels map[string]string) func() (bool, error)

CheckPodsAreRunning returns a function which polls multiple Pods by label and returns if it is running

func DaemonSetIsReady

func DaemonSetIsReady(ds *appsv1.DaemonSet) bool

DaemonSetIsReady returns true if a DaemonSet is considered ready

func DeploymentIsReady

func DeploymentIsReady(d *appsv1.Deployment) bool

DeploymentIsReady returns true if a Deployment is considered ready

func MCPContainsARODNSConfig

func MCPContainsARODNSConfig(mcp mcv1.MachineConfigPool) bool

func MachineConfigPoolIsReady

func MachineConfigPoolIsReady(s *mcv1.MachineConfigPool) bool

MachineConfigPoolIsReady returns true if a MachineConfigPool is considered ready

func NodeIsReady

func NodeIsReady(node *corev1.Node) bool

NodeIsReady returns true if a Node is considered ready

func PodIsRunning

func PodIsRunning(p *corev1.Pod) bool

PodIsRunning returns true if a Pod is running

func SameNumberOfNodesAndMachines

func SameNumberOfNodesAndMachines(ctx context.Context, mcpLister MCPLister, nodeLister NodeLister) (bool, error)

SameNumberOfNodesAndMachines returns true if the cluster has the same number of nodes and total machines, and an error if any. Otherwise it returns false and nil.

func ServiceIsReady

func ServiceIsReady(svc *corev1.Service) bool

ServiceIsReady returns true if a Service is considered ready

func StatefulSetIsReady

func StatefulSetIsReady(s *appsv1.StatefulSet) bool

StatefulSetIsReady returns true if a StatefulSet is considered ready

func TotalMachinesInTheMCPs

func TotalMachinesInTheMCPs(machineConfigPools []mcv1.MachineConfigPool) (int, error)

TotalMachinesInTheMCPs returns the total number of machines in the machineConfigPools and an error, if any.

Types

type MCPLister

type MCPLister interface {
	List(ctx context.Context, opts metav1.ListOptions) (*mcv1.MachineConfigPoolList, error)
}

type NodeLister

type NodeLister interface {
	List(ctx context.Context, opts metav1.ListOptions) (*corev1.NodeList, error)
}

Jump to

Keyboard shortcuts

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