From fe8e896df872e4dd6bc35e9022b0915acc6e5fa1 Mon Sep 17 00:00:00 2001 From: Michal Wozniak Date: Mon, 19 Feb 2024 10:19:14 +0100 Subject: [PATCH] Improve the doc comment for the Job status.active field --- api/openapi-spec/swagger.json | 2 +- api/openapi-spec/v3/apis__batch__v1_openapi.json | 2 +- pkg/apis/batch/types.go | 3 ++- pkg/generated/openapi/zz_generated.openapi.go | 2 +- staging/src/k8s.io/api/batch/v1/generated.proto | 3 ++- staging/src/k8s.io/api/batch/v1/types.go | 3 ++- staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 62a8a2fbaa0..7386b4bed3f 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -4343,7 +4343,7 @@ "description": "JobStatus represents the current state of a Job.", "properties": { "active": { - "description": "The number of pending and running pods.", + "description": "The number of pending and running pods which are not terminating (without a deletionTimestamp).", "format": "int32", "type": "integer" }, diff --git a/api/openapi-spec/v3/apis__batch__v1_openapi.json b/api/openapi-spec/v3/apis__batch__v1_openapi.json index 40c4bb36c85..2d874317efc 100644 --- a/api/openapi-spec/v3/apis__batch__v1_openapi.json +++ b/api/openapi-spec/v3/apis__batch__v1_openapi.json @@ -406,7 +406,7 @@ "description": "JobStatus represents the current state of a Job.", "properties": { "active": { - "description": "The number of pending and running pods.", + "description": "The number of pending and running pods which are not terminating (without a deletionTimestamp).", "format": "int32", "type": "integer" }, diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index 8b8cadaaf42..8ac1d5ab7fe 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -437,7 +437,8 @@ type JobStatus struct { // +optional CompletionTime *metav1.Time - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). // +optional Active int32 diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 81696e7e5cd..fe132ef1b21 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -15913,7 +15913,7 @@ func schema_k8sio_api_batch_v1_JobStatus(ref common.ReferenceCallback) common.Op }, "active": { SchemaProps: spec.SchemaProps{ - Description: "The number of pending and running pods.", + Description: "The number of pending and running pods which are not terminating (without a deletionTimestamp).", Type: []string{"integer"}, Format: "int32", }, diff --git a/staging/src/k8s.io/api/batch/v1/generated.proto b/staging/src/k8s.io/api/batch/v1/generated.proto index f8997798892..f050072b7c1 100644 --- a/staging/src/k8s.io/api/batch/v1/generated.proto +++ b/staging/src/k8s.io/api/batch/v1/generated.proto @@ -361,7 +361,8 @@ message JobStatus { // +optional optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTime = 3; - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). // +optional optional int32 active = 4; diff --git a/staging/src/k8s.io/api/batch/v1/types.go b/staging/src/k8s.io/api/batch/v1/types.go index 53fdf3c8d01..a48190ae1e9 100644 --- a/staging/src/k8s.io/api/batch/v1/types.go +++ b/staging/src/k8s.io/api/batch/v1/types.go @@ -441,7 +441,8 @@ type JobStatus struct { // +optional CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=completionTime"` - // The number of pending and running pods. + // The number of pending and running pods which are not terminating (without + // a deletionTimestamp). // +optional Active int32 `json:"active,omitempty" protobuf:"varint,4,opt,name=active"` diff --git a/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go index 980f1e47505..911c436f8d4 100644 --- a/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/batch/v1/types_swagger_doc_generated.go @@ -137,7 +137,7 @@ var map_JobStatus = map[string]string{ "conditions": "The latest available observations of an object's current state. When a Job fails, one of the conditions will have type \"Failed\" and status true. When a Job is suspended, one of the conditions will have type \"Suspended\" and status true; when the Job is resumed, the status of this condition will become false. When a Job is completed, one of the conditions will have type \"Complete\" and status true. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", "startTime": "Represents time when the job controller started processing a job. When a Job is created in the suspended state, this field is not set until the first time it is resumed. This field is reset every time a Job is resumed from suspension. It is represented in RFC3339 form and is in UTC.", "completionTime": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. The completion time is only set when the job finishes successfully.", - "active": "The number of pending and running pods.", + "active": "The number of pending and running pods which are not terminating (without a deletionTimestamp).", "succeeded": "The number of pods which reached phase Succeeded.", "failed": "The number of pods which reached phase Failed.", "terminating": "The number of pods which are terminating (in phase Pending or Running and have a deletionTimestamp).\n\nThis field is beta-level. The job controller populates the field when the feature gate JobPodReplacementPolicy is enabled (enabled by default).",