From 2d5901df3f766f34cf347f0fb20d9fa5729a405e Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Tue, 23 Jun 2020 16:17:26 +0100 Subject: [PATCH] pkg/apis: add 'notBefore' and 'renewalTime' fields to Certificate status Signed-off-by: James Munnelly --- pkg/apis/certmanager/v1alpha2/types_certificate.go | 11 +++++++++++ pkg/apis/certmanager/v1alpha3/types_certificate.go | 11 +++++++++++ pkg/internal/apis/certmanager/types_certificate.go | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/pkg/apis/certmanager/v1alpha2/types_certificate.go b/pkg/apis/certmanager/v1alpha2/types_certificate.go index 17ab0c81e..dd9d62f19 100644 --- a/pkg/apis/certmanager/v1alpha2/types_certificate.go +++ b/pkg/apis/certmanager/v1alpha2/types_certificate.go @@ -277,11 +277,22 @@ type CertificateStatus struct { // +optional LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"` + // The time after which the certificate stored in the secret named + // by this resource in spec.secretName is valid. + // +optional + NotBefore *metav1.Time `json:"notBefore,omitempty"` + // The expiration time of the certificate stored in the secret named // by this resource in spec.secretName. // +optional NotAfter *metav1.Time `json:"notAfter,omitempty"` + // RenewalTime is the time at which the certificate will be next + // renewed. + // If not set, no upcoming renewal is scheduled. + // +optional + RenewalTime *metav1.Time `json:"renewalTime,omitempty"` + // The current 'revision' of the certificate as issued. // // When a CertificateRequest resource is created, it will have the diff --git a/pkg/apis/certmanager/v1alpha3/types_certificate.go b/pkg/apis/certmanager/v1alpha3/types_certificate.go index 7d8afbc91..54b3717dd 100644 --- a/pkg/apis/certmanager/v1alpha3/types_certificate.go +++ b/pkg/apis/certmanager/v1alpha3/types_certificate.go @@ -276,11 +276,22 @@ type CertificateStatus struct { // +optional LastFailureTime *metav1.Time `json:"lastFailureTime,omitempty"` + // The time after which the certificate stored in the secret named + // by this resource in spec.secretName is valid. + // +optional + NotBefore *metav1.Time `json:"notBefore,omitempty"` + // The expiration time of the certificate stored in the secret named // by this resource in spec.secretName. // +optional NotAfter *metav1.Time `json:"notAfter,omitempty"` + // RenewalTime is the time at which the certificate will be next + // renewed. + // If not set, no upcoming renewal is scheduled. + // +optional + RenewalTime *metav1.Time `json:"renewalTime,omitempty"` + // The current 'revision' of the certificate as issued. // // When a CertificateRequest resource is created, it will have the diff --git a/pkg/internal/apis/certmanager/types_certificate.go b/pkg/internal/apis/certmanager/types_certificate.go index 265e0df09..39189c3d9 100644 --- a/pkg/internal/apis/certmanager/types_certificate.go +++ b/pkg/internal/apis/certmanager/types_certificate.go @@ -226,10 +226,22 @@ type CertificateStatus struct { LastFailureTime *metav1.Time + // The time after which the certificate stored in the secret named + // by this resource in spec.secretName is valid. + // +optional + NotBefore *metav1.Time + // The expiration time of the certificate stored in the secret named // by this resource in spec.secretName. + // +optional NotAfter *metav1.Time + // RenewalTime is the time at which the certificate will be next + // renewed. + // If not set, no upcoming renewal is scheduled. + // +optional + RenewalTime *metav1.Time + // The current 'revision' of the certificate as issued. // // When a CertificateRequest resource is created, it will have the