diff --git a/deploy/crds/crd-certificates.yaml b/deploy/crds/crd-certificates.yaml index 6d7c8363a..854886a7c 100644 --- a/deploy/crds/crd-certificates.yaml +++ b/deploy/crds/crd-certificates.yaml @@ -293,6 +293,10 @@ spec: message: description: Message is a human readable description of the details of the last transition, complementing reason. type: string + observedGeneration: + description: 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. + type: integer + format: int64 reason: description: Reason is a brief machine readable explanation for the condition's last transition. type: string @@ -588,6 +592,10 @@ spec: message: description: Message is a human readable description of the details of the last transition, complementing reason. type: string + observedGeneration: + description: 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. + type: integer + format: int64 reason: description: Reason is a brief machine readable explanation for the condition's last transition. type: string @@ -885,6 +893,10 @@ spec: message: description: Message is a human readable description of the details of the last transition, complementing reason. type: string + observedGeneration: + description: 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. + type: integer + format: int64 reason: description: Reason is a brief machine readable explanation for the condition's last transition. type: string @@ -1182,6 +1194,10 @@ spec: message: description: Message is a human readable description of the details of the last transition, complementing reason. type: string + observedGeneration: + description: 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. + type: integer + format: int64 reason: description: Reason is a brief machine readable explanation for the condition's last transition. type: string diff --git a/test/integration/certificates/issuing_controller_test.go b/test/integration/certificates/issuing_controller_test.go index 8a0066150..431a316aa 100644 --- a/test/integration/certificates/issuing_controller_test.go +++ b/test/integration/certificates/issuing_controller_test.go @@ -184,7 +184,7 @@ func TestIssuingController(t *testing.T) { } // Add Issuing condition to Certificate - apiutil.SetCertificateCondition(crt, cmapi.CertificateConditionIssuing, cmmeta.ConditionTrue, "", "") + apiutil.SetCertificateCondition(crt, crt.Generation, cmapi.CertificateConditionIssuing, cmmeta.ConditionTrue, "", "") crt.Status.NextPrivateKeySecretName = &nextPrivateKeySecretName crt.Status.Revision = &revision crt, err = cmCl.CertmanagerV1().Certificates(namespace).UpdateStatus(ctx, crt, metav1.UpdateOptions{}) @@ -395,7 +395,7 @@ func TestIssuingController_PKCS8_PrivateKey(t *testing.T) { } // Add Issuing condition to Certificate - apiutil.SetCertificateCondition(crt, cmapi.CertificateConditionIssuing, cmmeta.ConditionTrue, "", "") + apiutil.SetCertificateCondition(crt, crt.Generation, cmapi.CertificateConditionIssuing, cmmeta.ConditionTrue, "", "") crt.Status.NextPrivateKeySecretName = &nextPrivateKeySecretName crt.Status.Revision = &revision crt, err = cmCl.CertmanagerV1().Certificates(namespace).UpdateStatus(ctx, crt, metav1.UpdateOptions{}) diff --git a/test/integration/ctl/ctl_status_certificate_test.go b/test/integration/ctl/ctl_status_certificate_test.go index f3b1429f4..f8575457c 100644 --- a/test/integration/ctl/ctl_status_certificate_test.go +++ b/test/integration/ctl/ctl_status_certificate_test.go @@ -566,7 +566,7 @@ CertificateRequest: func setCertificateStatus(cmCl versioned.Interface, crt *cmapi.Certificate, status *cmapi.CertificateStatus, ctx context.Context) (*cmapi.Certificate, error) { for _, cond := range status.Conditions { - apiutil.SetCertificateCondition(crt, cond.Type, cond.Status, cond.Reason, cond.Message) + apiutil.SetCertificateCondition(crt, crt.Generation, cond.Type, cond.Status, cond.Reason, cond.Message) } crt.Status.NotAfter = status.NotAfter crt.Status.Revision = status.Revision