k8sclient

package
v1.13.13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToK8s

func ConnectToK8s() (*kubernetes.Clientset, error)

ConnectToK8s establishes a connection to the k8s and returns a *kubernetes.Clientset

func ConnectToK8sDynamic added in v1.5.33

func ConnectToK8sDynamic() (dynamic.Interface, error)

ConnectToK8sDynamic establishes a connection to the k8s and returns a dynamic.Interface

func GetAPIServerLogs added in v1.3.45

func GetAPIServerLogs(ctx context.Context, k8sClient kubernetes.Interface, namespace string) ([]string, error)

GetAPIServerLogs returns the latest logs from the API server deployment

func GetClusterVersion added in v1.3.45

func GetClusterVersion(k8sClient kubernetes.Interface) (string, error)

GetClusterVersion returns the current version of the Kubernetes cluster

func GetIngressAddress

func GetIngressAddress(clientSet kubernetes.Interface, ingressName string, namespace string) (string, error)

GetIngressAddress gets the hostname or ip address of the ingress with name.

func GetK8sClientConfig added in v1.5.33

func GetK8sClientConfig() (*rest.Config, error)

func GetOperatorLogs added in v1.3.45

func GetOperatorLogs(ctx context.Context, k8sClient kubernetes.Interface, namespace string) ([]string, error)

GetOperatorLogs returns the logs from the operator

func GetPodLogs added in v1.3.45

func GetPodLogs(ctx context.Context, k8sClient kubernetes.Interface, namespace string, selector string) ([]string, error)

GetPodLogs returns logs for pods specified by the label selector

func HasPodSucceeded added in v0.6.4

func HasPodSucceeded(c kubernetes.Interface, podName, namespace string) wait.ConditionFunc

HasPodSucceeded custom method for checing if Pod is succeded (handles PodFailed state too)

func IsPersistentVolumeClaimBound

func IsPersistentVolumeClaimBound(c kubernetes.Interface, podName, namespace string) wait.ConditionFunc

IsPersistentVolumeClaimBound TODO: add description.

func IsPodReady

func IsPodReady(c kubernetes.Interface, podName, namespace string) wait.ConditionFunc

IsPodReady check if the pod in question is running state

func IsPodRunning

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

IsPodRunning check if the pod in question is running state

func WaitForPodsReady

func WaitForPodsReady(k8sClient kubernetes.Interface, namespace string, instance string, timeout time.Duration) error

WaitForPodsReady wait for pods to be running with a timeout, return error

Types

This section is empty.

Jump to

Keyboard shortcuts

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