mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Merge pull request #116102 from danielvegamyhre/strategy-nit
Move AllowElasticIndexedJobs into JobValidationOptions declaration
This commit is contained in:
commit
aad3050519
@ -169,6 +169,7 @@ func validationOptionsForJob(newJob, oldJob *batch.Job) batchvalidation.JobValid
|
||||
opts := batchvalidation.JobValidationOptions{
|
||||
PodValidationOptions: pod.GetValidationOptionsFromPodTemplate(newPodTemplate, oldPodTemplate),
|
||||
AllowTrackingAnnotation: true,
|
||||
AllowElasticIndexedJobs: utilfeature.DefaultFeatureGate.Enabled(features.ElasticIndexedJob),
|
||||
}
|
||||
if oldJob != nil {
|
||||
opts.AllowInvalidLabelValueInSelector = opts.AllowInvalidLabelValueInSelector || metav1validation.LabelSelectorHasInvalidLabelValue(oldJob.Spec.Selector)
|
||||
@ -185,9 +186,6 @@ func validationOptionsForJob(newJob, oldJob *batch.Job) batchvalidation.JobValid
|
||||
opts.AllowMutableSchedulingDirectives = utilfeature.DefaultFeatureGate.Enabled(features.JobMutableNodeSchedulingDirectives) &&
|
||||
suspended && notStarted
|
||||
}
|
||||
|
||||
// Elastic indexed jobs (mutable completions iff updated parallelism == updated completions)
|
||||
opts.AllowElasticIndexedJobs = utilfeature.DefaultFeatureGate.Enabled(features.ElasticIndexedJob)
|
||||
return opts
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user