Help us shape the future of Go! Take the 2026 Go Developer Survey

util

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 23 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 FindPVC added in v0.4.0

func FindPVC(clientSet *kubernetes.Clientset, pvcName string) (*corev1.PersistentVolumeClaim, error)

func GetAppPodList

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

func GetCSIDashboardDeployment added in v0.6.0

func GetCSIDashboardDeployment(clientSet *kubernetes.Clientset) (*appsv1.Deployment, error)

func GetCSIDashboardPod added in v0.4.0

func GetCSIDashboardPod(clientSet *kubernetes.Clientset) (*corev1.Pod, error)

func GetCSINode

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

func GetCSINodeList

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

func GetContainerErrorMessage

func GetContainerErrorMessage(pod corev1.Pod) string

func GetJob added in v0.4.0

func GetJob(clientSet *kubernetes.Clientset, jobName string) (*batchv1.Job, error)

func GetJobDuration added in v0.4.0

func GetJobDuration(job batchv1.Job) string

func GetJobStatus added in v0.4.0

func GetJobStatus(job batchv1.Job) 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 GetPVOfPVC added in v0.4.0

func GetPVStatus

func GetPVStatus(pv corev1.PersistentVolume) string

func GetPodList

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

func GetPodOfUpgradeJob added in v0.4.0

func GetPodOfUpgradeJob(clientSet *kubernetes.Clientset, job *batchv1.Job) (*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 GetSecretList added in v0.4.0

func GetSecretList(clientSet *kubernetes.Clientset, namespace string) ([]corev1.Secret, error)

func GetShareMountModes added in v0.8.0

func GetShareMountModes(csiNodes []corev1.Pod) (storageClassShareMount bool, fsShareMount bool)

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 IsShareMount added in v0.4.0

func IsShareMount(pod *corev1.Pod) bool

func ListBatchJobs added in v0.4.0

func ListBatchJobs(clientSet *kubernetes.Clientset) ([]batchv1.Job, error)

func ListBatchPods added in v0.4.0

func ListBatchPods(clientSet *kubernetes.Clientset, conf *jConfig.BatchConfig) ([]corev1.Pod, error)

func ListMoundPods added in v0.4.0

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

func ListNodePodsByUID added in v0.8.0

func ListNodePodsByUID(clientSet kubernetes.Interface, nodeName string) (map[string]*corev1.Pod, error)

func ListUpgradeConfigs added in v0.4.0

func ListUpgradeConfigs(clientSet *kubernetes.Clientset) (map[string]*jConfig.BatchConfig, error)

func TabbedString

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

func ToPtr added in v0.4.0

func ToPtr[T any](v T) *T

func TranslateTimestampSince

func TranslateTimestampSince(timestamp metav1.Time) string

func WaitForConfirm added in v0.4.0

func WaitForConfirm() bool

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