From f905f6a2aafc3e5754dcde2f742e7338c1941a2e Mon Sep 17 00:00:00 2001 From: joshvanl Date: Tue, 9 Mar 2021 18:27:21 +0000 Subject: [PATCH] Adds ObservedGeneration to issuer condition status Signed-off-by: joshvanl --- pkg/apis/certmanager/v1/types_issuer.go | 8 ++++++++ pkg/apis/certmanager/v1alpha2/types_issuer.go | 8 ++++++++ pkg/apis/certmanager/v1alpha3/types_issuer.go | 8 ++++++++ pkg/apis/certmanager/v1beta1/types_issuer.go | 8 ++++++++ pkg/internal/apis/certmanager/types_issuer.go | 7 +++++++ 5 files changed, 39 insertions(+) diff --git a/pkg/apis/certmanager/v1/types_issuer.go b/pkg/apis/certmanager/v1/types_issuer.go index 25c786e72..9a929fc1a 100644 --- a/pkg/apis/certmanager/v1/types_issuer.go +++ b/pkg/apis/certmanager/v1/types_issuer.go @@ -323,6 +323,14 @@ type IssuerCondition struct { // transition, complementing reason. // +optional Message string `json:"message,omitempty"` + + // If set, this represents the .metadata.generation that the condition was + // set based upon. + // For instance, if .metadata.generation is currently 12, but the + // .status.condition[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the Issuer. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` } // IssuerConditionType represents an Issuer condition value. diff --git a/pkg/apis/certmanager/v1alpha2/types_issuer.go b/pkg/apis/certmanager/v1alpha2/types_issuer.go index 91872fc4e..261579ea4 100644 --- a/pkg/apis/certmanager/v1alpha2/types_issuer.go +++ b/pkg/apis/certmanager/v1alpha2/types_issuer.go @@ -319,6 +319,14 @@ type IssuerCondition struct { // transition, complementing reason. // +optional Message string `json:"message,omitempty"` + + // If set, this represents the .metadata.generation that the condition was + // set based upon. + // For instance, if .metadata.generation is currently 12, but the + // .status.condition[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the Issuer. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` } // IssuerConditionType represents an Issuer condition value. diff --git a/pkg/apis/certmanager/v1alpha3/types_issuer.go b/pkg/apis/certmanager/v1alpha3/types_issuer.go index 866778af7..ede177492 100644 --- a/pkg/apis/certmanager/v1alpha3/types_issuer.go +++ b/pkg/apis/certmanager/v1alpha3/types_issuer.go @@ -319,6 +319,14 @@ type IssuerCondition struct { // transition, complementing reason. // +optional Message string `json:"message,omitempty"` + + // If set, this represents the .metadata.generation that the condition was + // set based upon. + // For instance, if .metadata.generation is currently 12, but the + // .status.condition[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the Certificate. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` } // IssuerConditionType represents an Issuer condition value. diff --git a/pkg/apis/certmanager/v1beta1/types_issuer.go b/pkg/apis/certmanager/v1beta1/types_issuer.go index 0a1e1ddc2..e135ea674 100644 --- a/pkg/apis/certmanager/v1beta1/types_issuer.go +++ b/pkg/apis/certmanager/v1beta1/types_issuer.go @@ -321,6 +321,14 @@ type IssuerCondition struct { // transition, complementing reason. // +optional Message string `json:"message,omitempty"` + + // If set, this represents the .metadata.generation that the condition was + // set based upon. + // For instance, if .metadata.generation is currently 12, but the + // .status.condition[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the Certificate. + // +optional + ObservedGeneration int64 `json:"observedGeneration,omitempty"` } // IssuerConditionType represents an Issuer condition value. diff --git a/pkg/internal/apis/certmanager/types_issuer.go b/pkg/internal/apis/certmanager/types_issuer.go index 48e36a4da..77d81ffbf 100644 --- a/pkg/internal/apis/certmanager/types_issuer.go +++ b/pkg/internal/apis/certmanager/types_issuer.go @@ -289,6 +289,13 @@ type IssuerCondition struct { // Message is a human readable description of the details of the last // transition, complementing reason. Message string + + // If set, this represents the .metadata.generation that the condition was + // set based upon. + // For instance, if .metadata.generation is currently 12, but the + // .status.condition[x].observedGeneration is 9, the condition is out of date + // with respect to the current state of the Issuer. + ObservedGeneration int64 } // IssuerConditionType represents an Issuer condition value.