modules

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCmd

func ExecCmd(ctx context.Context, client kubernetes.Interface, config *rest.Config, pod types.NamespacedName,
	command string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error

ExecCmd exec command on specific pod and wait the command's output.

func GetNode

func GetNode(ctx context.Context, kubeClient *kubernetes.Clientset, nodeName string) *corev1.Node

func GetVersionFromImage

func GetVersionFromImage(image string) (string, bool)

func IsNodeRebooted

func IsNodeRebooted(l *zap.Logger, c kubernetes.Interface, nodeName, bootIdOld string) wait.ConditionWithContextFunc

func IsPodCompleted

func IsPodCompleted(c kubernetes.Interface, podName, namespace string) wait.ConditionWithContextFunc

func IsPodRunning

func IsPodRunning(c kubernetes.Interface, podName, namespace string) wait.ConditionWithContextFunc

func NodeVersionMatch

func NodeVersionMatch(l *zap.Logger, c kubernetes.Interface, nodeName string, version string) wait.ConditionWithContextFunc

Types

type KubernetesStateful

type KubernetesStateful interface {
	Name() string
	IsSupported(ctx context.Context) (bool, error)
	IsHealthy(ctx context.Context) (bool, error)
	IsDrainOk(ctx context.Context, nodeName string) (bool, error)
	PreDrain(ctx context.Context, nodeName string) error
	PostDrain(ctx context.Context, nodeName string) error
}

Jump to

Keyboard shortcuts

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