From 4024bab417b64d4b9c5def36f462389c863ebd57 Mon Sep 17 00:00:00 2001 From: Traian Schiau Date: Wed, 19 Jul 2023 11:48:27 +0300 Subject: [PATCH] [jobset] Partial-Admission KEP --- keps/420-partial-admission/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/keps/420-partial-admission/README.md b/keps/420-partial-admission/README.md index b82bfd357c..92feec3fea 100644 --- a/keps/420-partial-admission/README.md +++ b/keps/420-partial-admission/README.md @@ -13,6 +13,7 @@ - [Jobframework](#jobframework) - [batch/Job controller](#batchjob-controller) - [kubeflow/MPIJob controller](#kubeflowmpijob-controller) + - [kubernetes-sigs/jobset](#kubernetes-sigsjobset) - [Test Plan](#test-plan) - [Unit Tests](#unit-tests) - [Integration tests](#integration-tests) @@ -70,6 +71,14 @@ type PodSet struct { // enabled. // +optional MinCount *int32 `json:"minCount,omitempty"` + + // partialAdmissionDecrementStep is the step in which partialadmission will decremet the admission count. + // + // If this is provided, both minCount and count should be a multiple of it. + // If not provided and partial admission for the current PodSet is enabled this will be considered 1. + // This field is ignored if partial admission is not enabled (minCount == nil) + // +optional + PartialAdmissionDecrementStep *int32 `json:"partialAdmissionDecrementStep,omitempty"` } ``` @@ -80,6 +89,8 @@ In case the workload proposed for the current scheduling cycle, does not fit, wi The search should be optimized (binary search) and preserve the proportion of pods lost across the variable count PodSets. +If `partialAdmissionDecrementStep` is provided, the returned acceptable count will be rounded down to the closest multiple of `partialAdmissionDecrementStep`. + The accepted number of pods in each PodSet are recorded in `workload.Status.Admission.PodSetAssignments[*].ResourceUsage.Count` In order to evaluate the potential success of the preemption, the preemption process should be split in: @@ -144,6 +155,21 @@ In case of MPIJob `j.Spec.RunPolicy.SchedulingPolicy.MinAvailable` can be used t Whether an MPIJob supports partial admission or not can be deduced based on `MinAvailable` without the need of a dedicated annotation. Additional research is needed into the potential usage of multiple variable count PodSets. +### kubernetes-sigs/jobset + +Besides adapting `RunWithPodSetsInfo` and `RestorePodSetsInfo` it should also: + +- rework `PodSets()` to populate `MinCount` and `PartialAdmissionDecrementStep` if the jobset is marked to support partial admission. + * jobsets supporting partial admission should have a dedicated annotation. eg. `kueue.x-k8s.io/jobset-min-replicas`, indicating the index of the replicated job that supports partial admission as well as the minimum `replicas` acceptable. + +``` +MinCount = minimumReplicas * replicatedJobParallelism +PartialAdmissionDecrementStep = replicatedJobParallelism +``` + +NOTE: Currently jobset is not supporting `replicas` updates, this needs to be implemented on the jobset side. + + ### Test Plan No regressions in the current test should be observed.