testing

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakePod

func MakePod(name string, cpuRequest, memoryRequest int64, qosLevel string) *v1.Pod

func MakePodWithExtendResources

func MakePodWithExtendResources(name string, cpuRequest, memoryRequest int64, qosLevel string) *v1.Pod

Types

type PodProvider

type PodProvider struct {
	// contains filtered or unexported fields
}

PodProvider is used to get pods and evicted pods, just for testing.

func NewPodProvider

func NewPodProvider(pods ...*v1.Pod) *PodProvider

func (*PodProvider) Evict

func (m *PodProvider) Evict(ctx context.Context, pod *v1.Pod, eventRecorder record.EventRecorder, gracePeriodSeconds int64, evictMsg string) bool

func (*PodProvider) GetEvictedPods

func (m *PodProvider) GetEvictedPods() []*v1.Pod

func (*PodProvider) GetPodsFunc

func (m *PodProvider) GetPodsFunc() ([]*v1.Pod, error)

Jump to

Keyboard shortcuts

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