util

package
v0.5.0-devel Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout            = time.Second * 30
	ConsistentDuration = time.Second * 3
	Interval           = time.Millisecond * 250
)

Variables

This section is empty.

Functions

func DeleteAllJobsInNamespace added in v0.4.0

func DeleteAllJobsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error

func DeleteClusterQueue

func DeleteClusterQueue(ctx context.Context, c client.Client, cq *kueue.ClusterQueue) error

func DeleteLocalQueue

func DeleteLocalQueue(ctx context.Context, c client.Client, q *kueue.LocalQueue) error

func DeleteNamespace

func DeleteNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error

DeleteNamespace deletes all objects the tests typically create in the namespace.

func DeleteResourceFlavor

func DeleteResourceFlavor(ctx context.Context, c client.Client, rf *kueue.ResourceFlavor) error

func DeleteRuntimeClass

func DeleteRuntimeClass(ctx context.Context, c client.Client, runtimeClass *nodev1.RuntimeClass) error

func DeleteWorkload

func DeleteWorkload(ctx context.Context, c client.Client, wl *kueue.Workload) error

func DeleteWorkloadsInNamespace

func DeleteWorkloadsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error

func ExpectAdmittedActiveWorkloadsMetric

func ExpectAdmittedActiveWorkloadsMetric(cq *kueue.ClusterQueue, v int)

func ExpectAdmittedWorkloadsTotalMetric

func ExpectAdmittedWorkloadsTotalMetric(cq *kueue.ClusterQueue, v int)

func ExpectClusterQueueStatusMetric

func ExpectClusterQueueStatusMetric(cq *kueue.ClusterQueue, status metrics.ClusterQueueStatus)

func ExpectClusterQueueToBeDeleted

func ExpectClusterQueueToBeDeleted(ctx context.Context, k8sClient client.Client, cq *kueue.ClusterQueue, deleteCq bool)

func ExpectPendingWorkloadsMetric

func ExpectPendingWorkloadsMetric(cq *kueue.ClusterQueue, active, inadmissible int)

func ExpectResourceFlavorToBeDeleted

func ExpectResourceFlavorToBeDeleted(ctx context.Context, k8sClient client.Client, rf *kueue.ResourceFlavor, deleteRf bool)

func ExpectWorkloadToBeAdmittedAs

func ExpectWorkloadToBeAdmittedAs(ctx context.Context, k8sClient client.Client, wl *kueue.Workload, admission *kueue.Admission)

func ExpectWorkloadsToBeAdmitted

func ExpectWorkloadsToBeAdmitted(ctx context.Context, k8sClient client.Client, cqName string, wls ...*kueue.Workload)

func ExpectWorkloadsToBeFrozen

func ExpectWorkloadsToBeFrozen(ctx context.Context, k8sClient client.Client, cq string, wls ...*kueue.Workload)

func ExpectWorkloadsToBePending

func ExpectWorkloadsToBePending(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)

func ExpectWorkloadsToBeWaiting

func ExpectWorkloadsToBeWaiting(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)

func FilterAdmittedWorkloads added in v0.4.0

func FilterAdmittedWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload) []*kueue.Workload

func FinishEvictionForWorkloads added in v0.4.0

func FinishEvictionForWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)

func FinishWorkloads

func FinishWorkloads(ctx context.Context, k8sClient client.Client, workloads ...*kueue.Workload)

func SetAdmission

func SetAdmission(ctx context.Context, k8sClient client.Client, wl *kueue.Workload, admission *kueue.Admission) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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