kubernetes

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinimumVersion = "1.25"
)

Variables

This section is empty.

Functions

func CordonNode

func CordonNode(ctx context.Context, k8s *kubernetes.Clientset, node *corev1.Node, logger logr.Logger) error

func CreateNginxPodInNode

func CreateNginxPodInNode(ctx context.Context, k8s *kubernetes.Clientset, nodeName, namespace, region string, logger logr.Logger) error

func DeleteNode

func DeleteNode(ctx context.Context, k8s *kubernetes.Clientset, name string) error

func DeletePod

func DeletePod(ctx context.Context, k8s *kubernetes.Clientset, name, namespace string) error

func DrainNode

func DrainNode(ctx context.Context, k8s *kubernetes.Clientset, node *corev1.Node) error

func EnsureNodeWithIPIsDeleted

func EnsureNodeWithIPIsDeleted(ctx context.Context, k8s *kubernetes.Clientset, internalIP string) error

func ExecPod

func ExecPod(ctx context.Context, config *restclient.Config, k8s *kubernetes.Clientset, name, namespace string, cmd ...string) (stdout, stderr string, err error)

func GetNginxPodName

func GetNginxPodName(name string) string

func GetPodLogs

func GetPodLogs(ctx context.Context, k8s *kubernetes.Clientset, name, namespace string) (string, error)

func IsPreviousVersionSupported

func IsPreviousVersionSupported(kubernetesVersion string) (bool, error)

func PreviousVersion

func PreviousVersion(kubernetesVersion string) (string, error)

func UncordonNode

func UncordonNode(ctx context.Context, k8s *kubernetes.Clientset, node *corev1.Node) error

func WaitForHybridNodeToBeNotReady

func WaitForHybridNodeToBeNotReady(ctx context.Context, k8s *kubernetes.Clientset, nodeName string, logger logr.Logger) error

func WaitForHybridNodeToBeReady

func WaitForHybridNodeToBeReady(ctx context.Context, k8s *kubernetes.Clientset, nodeName string, logger logr.Logger) error

func WaitForNode

func WaitForNode(ctx context.Context, k8s *kubernetes.Clientset, internalIP string, logger logr.Logger) (*corev1.Node, error)

WaitForNode wait for the node to join the cluster and fetches the node info from an internal IP address of the node

func WaitForNodeToHaveVersion

func WaitForNodeToHaveVersion(ctx context.Context, k8s *kubernetes.Clientset, nodeName, targetVersion string, logger logr.Logger) (*corev1.Node, error)

Types

type VerifyNode

type VerifyNode struct {
	ClientConfig *rest.Config
	K8s          *clientgo.Clientset
	Logger       logr.Logger
	Region       string

	NodeIPAddress string
}

VerifyNode checks that a node is healthy, can run pods, extract logs and run commands on them.

func (VerifyNode) Run

func (t VerifyNode) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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