utils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultQPS   = 10000
	DefaultBurst = 20000
)

Variables

This section is empty.

Functions

func BuildKubeSchedulerCompletedConfig

func BuildKubeSchedulerCompletedConfig(config, kubeconfig string) (*schedconfig.CompletedConfig, error)

func BuildRestConfig

func BuildRestConfig(config string) (*restclient.Config, error)

func ComputePodResourceRequest

func ComputePodResourceRequest(pod *corev1.Pod) *framework.Resource

func GetPodSource

func GetPodSource(pod *corev1.Pod) (string, error)

GetPodSource returns the source of the pod based on the annotation.

func InitPod

func InitPod(podTemplate *corev1.Pod) *corev1.Pod

func IsCloneSetPod

func IsCloneSetPod(ownerRefList []metav1.OwnerReference) bool

IsCloneSetPod returns true if the pod is a IsCloneSetPod.

func IsDaemonsetPod

func IsDaemonsetPod(ownerRefList []metav1.OwnerReference) bool

IsDaemonsetPod returns true if the pod is a IsDaemonsetPod.

func IsMirrorPod

func IsMirrorPod(pod *corev1.Pod) bool

IsMirrorPod returns true if the pod is a Mirror Pod.

func IsPodTerminating

func IsPodTerminating(pod *corev1.Pod) bool

IsPodTerminating returns true if the pod DeletionTimestamp is set.

func IsPodWithLocalStorage

func IsPodWithLocalStorage(pod *corev1.Pod) bool

IsPodWithLocalStorage returns true if the pod has local storage.

func IsStaticPod

func IsStaticPod(pod *corev1.Pod) bool

IsStaticPod returns true if the pod is a static pod.

func PrintJson

func PrintJson(r pkg.Printer) error

func PrintYaml

func PrintYaml(r pkg.Printer) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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