mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
add feature gate
This commit is contained in:
@@ -1482,7 +1482,10 @@ func (jm *Controller) manageJob(ctx context.Context, job *batch.Job, activePods
|
||||
if completionIndex != unknownCompletionIndex {
|
||||
template = podTemplate.DeepCopy()
|
||||
addCompletionIndexAnnotation(template, completionIndex)
|
||||
addCompletionIndexLabel(template, completionIndex)
|
||||
|
||||
if feature.DefaultFeatureGate.Enabled(features.PodIndexLabel) {
|
||||
addCompletionIndexLabel(template, completionIndex)
|
||||
}
|
||||
template.Spec.Hostname = fmt.Sprintf("%s-%d", job.Name, completionIndex)
|
||||
generateName = podGenerateNameWithIndex(job.Name, completionIndex)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user