From 22b3a9cd21bf8cdbe3725b954778fc92b9f736f7 Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Wed, 10 Feb 2021 12:49:30 +0100 Subject: [PATCH] Introduce .status.lastSuccessfulTime field for CronJob --- pkg/apis/batch/types.go | 4 ++++ staging/src/k8s.io/api/batch/v1beta1/types.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/pkg/apis/batch/types.go b/pkg/apis/batch/types.go index 570ebfd97f1..08c2253a88d 100644 --- a/pkg/apis/batch/types.go +++ b/pkg/apis/batch/types.go @@ -364,4 +364,8 @@ type CronJobStatus struct { // Information when was the last time the job was successfully scheduled. // +optional LastScheduleTime *metav1.Time + + // Information when was the last time the job successfully completed. + // +optional + LastSuccessfulTime *metav1.Time } diff --git a/staging/src/k8s.io/api/batch/v1beta1/types.go b/staging/src/k8s.io/api/batch/v1beta1/types.go index 07b411b6fdf..57bde89d233 100644 --- a/staging/src/k8s.io/api/batch/v1beta1/types.go +++ b/staging/src/k8s.io/api/batch/v1beta1/types.go @@ -162,4 +162,8 @@ type CronJobStatus struct { // Information when was the last time the job was successfully scheduled. // +optional LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty" protobuf:"bytes,4,opt,name=lastScheduleTime"` + + // Information when was the last time the job successfully completed. + // +optional + LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty" protobuf:"bytes,5,opt,name=lastSuccessfulTime"` }