utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAWSNodeInfoList

func GetAWSNodeInfoList(machineClient *machineclient.Clientset) (map[v1alpha1.NodeName]string, error)

GetAWSNodeInfoList returns a list of the node names and their identification, e.g., AWS instance ID

func GetBMHNodeInfoList

func GetBMHNodeInfoList(machineClient *machineclient.Clientset) (map[v1alpha1.NodeName]string, error)

GetBMHNodeInfoList returns a list of the node names and their identification, e.g., ports

func GetBootTime

func GetBootTime(c *kubernetes.Clientset, nodeName string, ns string, log logr.Logger) (time.Time, error)

GetBootTime returns the node's boot time, otherwise it fails and returns an error

func GetClusterInfo

func GetClusterInfo(config configclient.Interface) (*configv1.Infrastructure, error)

GetClusterInfo fetch the cluster's infrastructure object to identify its type

func GetLogs

func GetLogs(c *kubernetes.Clientset, pod *corev1.Pod, containerName string) (string, error)

GetLogs returns logs of the specified container containerName

func GetPod

func GetPod(nodeName, containerName string) *corev1.Pod

func GetSecretData

func GetSecretData(clientSet *kubernetes.Clientset, secretName, secretNamespace, secretData1, secretData2 string) (string, string, error)

GetSecretData searches for the platform's secret, and then returns its decoded two data values. E.g. on AWS it would be the Access Key and its ID, but on BMH with fence_impilan it would be useranme and password

func StopKubelet

func StopKubelet(c *kubernetes.Clientset, nodeName string, testNsName string, log logr.Logger) error

StopKubelet runs cmd command to stop kubelet for the node and returns an error only if it fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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