diff --git a/pkg/apis/common/v1/openapi_generated.go b/pkg/apis/common/v1/openapi_generated.go index 3f8ddd46..1139a313 100644 --- a/pkg/apis/common/v1/openapi_generated.go +++ b/pkg/apis/common/v1/openapi_generated.go @@ -253,7 +253,7 @@ func schema_pkg_apis_common_v1_RunPolicy(ref common.ReferenceCallback) common.Op Properties: map[string]spec.Schema{ "cleanPodPolicy": { SchemaProps: spec.SchemaProps{ - Description: "CleanPodPolicy defines the policy to kill pods after the job completes. Default to Running.", + Description: "CleanPodPolicy defines the policy to kill pods after the job completes. Default to None.", Type: []string{"string"}, Format: "", }, diff --git a/pkg/apis/common/v1/types.go b/pkg/apis/common/v1/types.go index bb5e4148..c892a78a 100644 --- a/pkg/apis/common/v1/types.go +++ b/pkg/apis/common/v1/types.go @@ -179,7 +179,7 @@ const ( // active. type RunPolicy struct { // CleanPodPolicy defines the policy to kill pods after the job completes. - // Default to Running. + // Default to None. CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty"` // TTLSecondsAfterFinished is the TTL to clean up jobs. diff --git a/pkg/controller.v1/common/job_test.go b/pkg/controller.v1/common/job_test.go index fa07851e..9ac33ef7 100644 --- a/pkg/controller.v1/common/job_test.go +++ b/pkg/controller.v1/common/job_test.go @@ -191,7 +191,7 @@ func TestCleanupJobIfTTL(T *testing.T) { } oneDayAgo := time.Now() // one day ago - oneDayAgo.AddDate(0, 0, -1) + _ = oneDayAgo.AddDate(0, 0, -1) jobStatus := apiv1.JobStatus{ CompletionTime: &metav1.Time{ Time: oneDayAgo,