Documentation ¶
Index ¶
- Constants
- Variables
- func AwaitAndVerifyCreatedWorkload(ctx context.Context, client client.Client, wlLookupKey types.NamespacedName, ...) *kueue.Workload
- func AwaitAndVerifyWorkloadQueueName(ctx context.Context, client client.Client, createdWorkload *kueue.Workload, ...)
- func AwaitWorkloadEvictionByPodsReadyTimeout(ctx context.Context, k8sClient client.Client, wlKey client.ObjectKey, ...)
- func BindPodWithNode(ctx context.Context, k8sClient client.Client, nodeName string, ...)
- func CreateClientUsingCluster(kContext string) (client.WithWatch, *rest.Config)
- func CreateVisibilityClient(user string) visibilityv1beta1.VisibilityV1beta1Interface
- func DeleteAllJobsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error
- func DeleteAllJobsetsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error
- func DeleteAllPodsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error
- func DeleteNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error
- func DeleteObject[PtrT objAsPtr[T], T any](ctx context.Context, c client.Client, o PtrT) error
- func DeleteWorkloadsInNamespace(ctx context.Context, c client.Client, ns *corev1.Namespace) error
- func ExpectAdmissionAttemptsMetric(pending, admitted int)
- func ExpectAdmittedWorkloadsTotalMetric(cq *kueue.ClusterQueue, v int)
- func ExpectCQResourceBorrowingQuota(cq *kueue.ClusterQueue, flavor, resource string, value float64)
- func ExpectCQResourceNominalQuota(cq *kueue.ClusterQueue, flavor, resource string, value float64)
- func ExpectCQResourceReservations(cq *kueue.ClusterQueue, flavor, resource string, value float64)
- func ExpectClusterQueueStatusMetric(cq *kueue.ClusterQueue, status metrics.ClusterQueueStatus)
- func ExpectClusterQueueWeightedShareMetric(cq *kueue.ClusterQueue, value int64)
- func ExpectClusterQueuesToBeActive(ctx context.Context, c client.Client, cqs ...*kueue.ClusterQueue)
- func ExpectEventsForObjects(eventWatcher watch.Interface, objs sets.Set[types.NamespacedName], ...)
- func ExpectEvictedWorkloadsTotalMetric(cqName, reason string, v int)
- func ExpectObjectToBeDeleted[PtrT objAsPtr[T], T any](ctx context.Context, k8sClient client.Client, o PtrT, deleteNow bool)
- func ExpectObjectToBeDeletedWithTimeout[PtrT objAsPtr[T], T any](ctx context.Context, k8sClient client.Client, o PtrT, deleteNow bool, ...)
- func ExpectPendingWorkloadsMetric(cq *kueue.ClusterQueue, active, inadmissible int)
- func ExpectPodUnsuspendedWithNodeSelectors(ctx context.Context, k8sClient client.Client, key types.NamespacedName, ...)
- func ExpectPodsFinalizedOrGone(ctx context.Context, k8sClient client.Client, keys ...types.NamespacedName)
- func ExpectPodsJustFinalized(ctx context.Context, k8sClient client.Client, keys ...types.NamespacedName)
- func ExpectPreemptedCondition(ctx context.Context, k8sClient client.Client, reason string, ...)
- func ExpectPreemptedWorkloadsTotalMetric(preemptorCqName, reason string, v int)
- func ExpectQuotaReservedWorkloadsTotalMetric(cq *kueue.ClusterQueue, v int)
- func ExpectReservingActiveWorkloadsMetric(cq *kueue.ClusterQueue, value int)
- func ExpectWorkloadToBeAdmittedAs(ctx context.Context, k8sClient client.Client, wl *kueue.Workload, ...)
- func ExpectWorkloadToFinish(ctx context.Context, k8sClient client.Client, wlKey client.ObjectKey)
- func ExpectWorkloadToHaveRequeueState(ctx context.Context, k8sClient client.Client, wlKey client.ObjectKey, ...)
- func ExpectWorkloadsFinalizedOrGone(ctx context.Context, k8sClient client.Client, keys ...types.NamespacedName)
- func ExpectWorkloadsToBeAdmitted(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func ExpectWorkloadsToBeAdmittedCount(ctx context.Context, k8sClient client.Client, count int, ...)
- func ExpectWorkloadsToBeFrozen(ctx context.Context, k8sClient client.Client, cq string, ...)
- func ExpectWorkloadsToBePending(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func ExpectWorkloadsToBePreempted(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func ExpectWorkloadsToBeWaiting(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func ExpectWorkloadsToHaveQuotaReservation(ctx context.Context, k8sClient client.Client, cqName string, ...)
- func FilterAdmittedWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload) []*kueue.Workload
- func FilterEvictedWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload) []*kueue.Workload
- func FinishEvictionForWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func FinishWorkloads(ctx context.Context, k8sClient client.Client, workloads ...*kueue.Workload)
- func NewTestingLogger(writer io.Writer, level int) logr.Logger
- func SetAdmissionCheckActive(ctx context.Context, k8sClient client.Client, ...)
- func SetPodsPhase(ctx context.Context, k8sClient client.Client, phase corev1.PodPhase, ...)
- func SetQuotaReservation(ctx context.Context, k8sClient client.Client, wl *kueue.Workload, ...) error
- func SetRequeuedConditionWithPodsReadyTimeout(ctx context.Context, k8sClient client.Client, wlKey client.ObjectKey)
- func SetWorkloadsAdmissionCheck(ctx context.Context, k8sClient client.Client, wl *kueue.Workload, check string, ...)
- func SyncAdmittedConditionForWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
- func UnholdClusterQueue(ctx context.Context, k8sClient client.Client, cq *kueue.ClusterQueue)
- func UnholdLocalQueue(ctx context.Context, k8sClient client.Client, lq *kueue.LocalQueue)
- func VerifyWorkloadPriority(createdWorkload *kueue.Workload, priorityClassName string, priorityValue int32)
- func WaitForJobSetAvailability(ctx context.Context, k8sClient client.Client)
- func WaitForKubeFlowMPIOperatorAvailability(ctx context.Context, k8sClient client.Client)
- func WaitForKubeFlowTrainingOperatorAvailability(ctx context.Context, k8sClient client.Client)
- func WaitForKueueAvailability(ctx context.Context, k8sClient client.Client)
- func WaitForNextSecondAfterCreation(obj client.Object)
Constants ¶
View Source
const ( TinyTimeout = 10 * time.Millisecond ShortTimeout = time.Second Timeout = 5 * time.Second // LongTimeout is meant for E2E tests when waiting for complex operations // such as running pods to completion. LongTimeout = 45 * time.Second // StartUpTimeout is meant to be used for waiting for Kueue to startup, given // that cert updates can take up to 3 minutes to propagate to the filesystem. // Taken into account that after the certificates are ready, all Kueue's components // need started and the time it takes for a change in ready probe response triggers // a change in the deployment status. StartUpTimeout = 5 * time.Minute ConsistentDuration = time.Second Interval = time.Millisecond * 250 )
View Source
const (
// E2eTestSleepImage is the image used for testing.
E2eTestSleepImage = "gcr.io/k8s-staging-perf-tests/sleep:v0.1.0@sha256:8d91ddf9f145b66475efda1a1b52269be542292891b5de2a7fad944052bab6ea"
)
Variables ¶
View Source
var ( IgnoreConditionTimestamps = cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime") IgnoreConditionTimestampsAndObservedGeneration = cmpopts.IgnoreFields(metav1.Condition{}, "LastTransitionTime", "ObservedGeneration") IgnoreConditionMessage = cmpopts.IgnoreFields(metav1.Condition{}, "Message") IgnoreObjectMetaResourceVersion = cmpopts.IgnoreFields(metav1.ObjectMeta{}, "ResourceVersion") )
Functions ¶
func AwaitAndVerifyCreatedWorkload ¶ added in v0.5.0
func AwaitAndVerifyWorkloadQueueName ¶ added in v0.5.0
func AwaitWorkloadEvictionByPodsReadyTimeout ¶ added in v0.6.3
func BindPodWithNode ¶ added in v0.6.3
func CreateClientUsingCluster ¶ added in v0.6.0
func CreateVisibilityClient ¶ added in v0.6.0
func CreateVisibilityClient(user string) visibilityv1beta1.VisibilityV1beta1Interface
func DeleteAllJobsInNamespace ¶ added in v0.4.0
func DeleteAllJobsetsInNamespace ¶ added in v0.7.0
func DeleteAllPodsInNamespace ¶ added in v0.6.0
func DeleteNamespace ¶
DeleteNamespace deletes all objects the tests typically create in the namespace.
func DeleteObject ¶ added in v0.8.0
func ExpectAdmissionAttemptsMetric ¶ added in v0.6.1
func ExpectAdmissionAttemptsMetric(pending, admitted int)
func ExpectAdmittedWorkloadsTotalMetric ¶
func ExpectAdmittedWorkloadsTotalMetric(cq *kueue.ClusterQueue, v int)
func ExpectCQResourceBorrowingQuota ¶ added in v0.5.0
func ExpectCQResourceBorrowingQuota(cq *kueue.ClusterQueue, flavor, resource string, value float64)
func ExpectCQResourceNominalQuota ¶ added in v0.5.0
func ExpectCQResourceNominalQuota(cq *kueue.ClusterQueue, flavor, resource string, value float64)
func ExpectCQResourceReservations ¶ added in v0.5.0
func ExpectCQResourceReservations(cq *kueue.ClusterQueue, flavor, resource string, value float64)
func ExpectClusterQueueStatusMetric ¶
func ExpectClusterQueueStatusMetric(cq *kueue.ClusterQueue, status metrics.ClusterQueueStatus)
func ExpectClusterQueueWeightedShareMetric ¶ added in v0.7.0
func ExpectClusterQueueWeightedShareMetric(cq *kueue.ClusterQueue, value int64)
func ExpectClusterQueuesToBeActive ¶ added in v0.9.0
func ExpectEventsForObjects ¶ added in v0.7.0
func ExpectEvictedWorkloadsTotalMetric ¶ added in v0.7.0
func ExpectObjectToBeDeleted ¶ added in v0.8.0
func ExpectObjectToBeDeletedWithTimeout ¶ added in v0.9.0
func ExpectPendingWorkloadsMetric ¶
func ExpectPendingWorkloadsMetric(cq *kueue.ClusterQueue, active, inadmissible int)
func ExpectPodUnsuspendedWithNodeSelectors ¶ added in v0.6.0
func ExpectPodsFinalizedOrGone ¶ added in v0.9.0
func ExpectPodsJustFinalized ¶ added in v0.9.0
func ExpectPreemptedCondition ¶ added in v0.8.0
func ExpectPreemptedWorkloadsTotalMetric ¶ added in v0.8.0
func ExpectQuotaReservedWorkloadsTotalMetric ¶ added in v0.7.0
func ExpectQuotaReservedWorkloadsTotalMetric(cq *kueue.ClusterQueue, v int)
func ExpectReservingActiveWorkloadsMetric ¶ added in v0.5.0
func ExpectReservingActiveWorkloadsMetric(cq *kueue.ClusterQueue, value int)
func ExpectWorkloadToFinish ¶ added in v0.6.0
func ExpectWorkloadToHaveRequeueState ¶ added in v0.6.3
func ExpectWorkloadsFinalizedOrGone ¶ added in v0.9.0
func ExpectWorkloadsToBeAdmittedCount ¶ added in v0.6.2
func ExpectWorkloadsToBePreempted ¶ added in v0.5.0
func ExpectWorkloadsToHaveQuotaReservation ¶ added in v0.5.0
func FilterAdmittedWorkloads ¶ added in v0.4.0
func FilterEvictedWorkloads ¶ added in v0.6.2
func FinishEvictionForWorkloads ¶ added in v0.4.0
func FinishWorkloads ¶
func NewTestingLogger ¶ added in v0.8.0
func SetAdmissionCheckActive ¶ added in v0.5.0
func SetAdmissionCheckActive(ctx context.Context, k8sClient client.Client, admissionCheck *kueue.AdmissionCheck, status metav1.ConditionStatus)
func SetPodsPhase ¶ added in v0.6.0
func SetQuotaReservation ¶ added in v0.5.0
func SetRequeuedConditionWithPodsReadyTimeout ¶ added in v0.7.0
func SetWorkloadsAdmissionCheck ¶ added in v0.5.0
func SyncAdmittedConditionForWorkloads ¶ added in v0.5.0
func SyncAdmittedConditionForWorkloads(ctx context.Context, k8sClient client.Client, wls ...*kueue.Workload)
SyncAdmittedConditionForWorkloads sets the Admission condition of the provided workloads based on the state of quota reservation and admission checks. It should be use in tests that are not running the workload controller.
func UnholdClusterQueue ¶ added in v0.8.0
func UnholdLocalQueue ¶ added in v0.8.0
func VerifyWorkloadPriority ¶ added in v0.5.0
func WaitForJobSetAvailability ¶ added in v0.7.1
func WaitForKubeFlowMPIOperatorAvailability ¶ added in v0.9.0
func WaitForKubeFlowTrainingOperatorAvailability ¶ added in v0.9.0
func WaitForKueueAvailability ¶ added in v0.6.0
func WaitForNextSecondAfterCreation ¶ added in v0.9.0
WaitForNextSecondAfterCreation wait time between the start of the next second after creationTimestamp and the current time to ensure that the new created object has a later creation time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.