From 0659305cf9c1f4977316efa8fc50fbdb1c392e42 Mon Sep 17 00:00:00 2001 From: Aldo Culquicondor Date: Wed, 8 Sep 2021 14:31:59 -0400 Subject: [PATCH] Add ready field to Job status to keep a count of the pods that have the ready condition. Also: - Add feature gate JobReadyPods. - Add Ready to describe. Change-Id: Ib934730a430a8e2a2f485671e345fe2330006939 Kubernetes-commit: 1bff5eb44d9897e12aff3ea10f5a856580158278 --- applyconfigurations/batch/v1/jobstatus.go | 9 +++++++++ applyconfigurations/internal/internal.go | 3 +++ 2 files changed, 12 insertions(+) diff --git a/applyconfigurations/batch/v1/jobstatus.go b/applyconfigurations/batch/v1/jobstatus.go index ba7e27e0..a36d5d0a 100644 --- a/applyconfigurations/batch/v1/jobstatus.go +++ b/applyconfigurations/batch/v1/jobstatus.go @@ -33,6 +33,7 @@ type JobStatusApplyConfiguration struct { Failed *int32 `json:"failed,omitempty"` CompletedIndexes *string `json:"completedIndexes,omitempty"` UncountedTerminatedPods *UncountedTerminatedPodsApplyConfiguration `json:"uncountedTerminatedPods,omitempty"` + Ready *int32 `json:"ready,omitempty"` } // JobStatusApplyConfiguration constructs an declarative configuration of the JobStatus type for use with @@ -109,3 +110,11 @@ func (b *JobStatusApplyConfiguration) WithUncountedTerminatedPods(value *Uncount b.UncountedTerminatedPods = value return b } + +// WithReady sets the Ready field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Ready field is set to the value of the last call. +func (b *JobStatusApplyConfiguration) WithReady(value int32) *JobStatusApplyConfiguration { + b.Ready = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index 2f57aae3..67e776fe 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -2671,6 +2671,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: failed type: scalar: numeric + - name: ready + type: + scalar: numeric - name: startTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time