util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientSet

func ClientSet(configFlags *genericclioptions.ConfigFlags) (*kubernetes.Clientset, error)

func GetAppPodList

func GetAppPodList(clientSet *kubernetes.Clientset, ns string) ([]corev1.Pod, error)

func GetCSINode

func GetCSINode(clientSet *kubernetes.Clientset, nodeName string) (*corev1.Pod, error)

func GetCSINodeList

func GetCSINodeList(clientSet *kubernetes.Clientset) ([]corev1.Pod, error)

func GetContainerErrorMessage

func GetContainerErrorMessage(pod corev1.Pod) string

func GetMountPathOfPod

func GetMountPathOfPod(pod corev1.Pod) (string, string, error)

func GetMountPodList

func GetMountPodList(clientSet *kubernetes.Clientset, volumeId string) ([]corev1.Pod, error)

func GetMountPodOnNode

func GetMountPodOnNode(clientSet *kubernetes.Clientset, nodeName string) ([]corev1.Pod, error)

func GetNamespaceList

func GetNamespaceList(clientSet *kubernetes.Clientset) ([]corev1.Namespace, error)

func GetPVCList

func GetPVCList(clientSet *kubernetes.Clientset, ns string) ([]corev1.PersistentVolumeClaim, error)

func GetPVCStatus

func GetPVCStatus(pvc corev1.PersistentVolumeClaim) string

func GetPVList

func GetPVList(clientSet *kubernetes.Clientset) ([]corev1.PersistentVolume, error)

func GetPVStatus

func GetPVStatus(pv corev1.PersistentVolume) string

func GetPodList

func GetPodList(clientSet *kubernetes.Clientset, ns string) ([]corev1.Pod, error)

func GetPodStatus

func GetPodStatus(pod corev1.Pod) string

getPodStatus: copy from kubernetes/pkg/printers/internalversion/printers.go, which `kubectl get po` used.

func GetStorageClassList

func GetStorageClassList(clientSet *kubernetes.Clientset) ([]storagev1.StorageClass, error)

func IfNil

func IfNil(field string) string

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

func TabbedString

func TabbedString(f func(io.Writer) error) (string, error)

func TranslateTimestampSince

func TranslateTimestampSince(timestamp metav1.Time) string

Types

type ClientVersion added in v0.3.0

type ClientVersion struct {
	IsCe  bool
	Dev   bool
	Major int
	Minor int
	Patch int
}

func ParseClientVersion added in v0.3.0

func ParseClientVersion(image string) ClientVersion

func (ClientVersion) LessThan added in v0.3.0

func (v ClientVersion) LessThan(o ClientVersion) bool

Jump to

Keyboard shortcuts

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