testutil

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PodsResource = schema.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}

Functions

func DefaultQOSStrategy

func DefaultQOSStrategy() *slov1alpha1.ResourceQOSStrategy

func GetNodeSLOByThreshold

func GetNodeSLOByThreshold(thresholdConfig *slov1alpha1.ResourceThresholdStrategy) *slov1alpha1.NodeSLO

func GetPodMetas

func GetPodMetas(pods []*corev1.Pod) []*statesinformer.PodMeta

func MockTestNode

func MockTestNode(cpu, memory string) *corev1.Node

func MockTestPod

func MockTestPod(qosClass apiext.QoSClass, name string) *corev1.Pod

func MockTestPodWithQOS

func MockTestPodWithQOS(kubeQosClass corev1.PodQOSClass, qosClass apiext.QoSClass) *statesinformer.PodMeta

Types

type FakeRecorder

type FakeRecorder struct {
	EventReason string
}

func (*FakeRecorder) AnnotatedEventf

func (f *FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventType, reason, messageFmt string, args ...interface{})

func (*FakeRecorder) Event

func (f *FakeRecorder) Event(object runtime.Object, eventType, reason, message string)

func (*FakeRecorder) Eventf

func (f *FakeRecorder) Eventf(object runtime.Object, eventType, reason, messageFmt string, args ...interface{})

Jump to

Keyboard shortcuts

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