From 0ed660873e15446d612405be0b4e578a8a228a2c Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:49:28 +0100 Subject: [PATCH] fix incorrect comments and error messages Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- pkg/apis/acme/v1/types_issuer.go | 5 +++-- pkg/controller/acmeorders/sync.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/apis/acme/v1/types_issuer.go b/pkg/apis/acme/v1/types_issuer.go index f20251563..db9415cc9 100644 --- a/pkg/apis/acme/v1/types_issuer.go +++ b/pkg/apis/acme/v1/types_issuer.go @@ -48,8 +48,9 @@ type ACMEIssuer struct { // endpoint. // For example, for Let's Encrypt's DST crosssign you would use: // "DST Root CA X3" or "ISRG Root X1" for the newer Let's Encrypt root CA. - // This value picks the first certificate bundle in the ACME alternative - // chains that has a certificate with this value as its issuer's CN + // This value picks the first certificate bundle in the combined set of + // ACME default and alternative chains that has a root-most certificate with + // this value as its issuer's commonname. // +optional // +kubebuilder:validation:MaxLength=64 PreferredChain string `json:"preferredChain,omitempty"` diff --git a/pkg/controller/acmeorders/sync.go b/pkg/controller/acmeorders/sync.go index 707b68e66..143306eb6 100644 --- a/pkg/controller/acmeorders/sync.go +++ b/pkg/controller/acmeorders/sync.go @@ -588,7 +588,7 @@ func (c *controller) finalizeOrder(ctx context.Context, cl acmecl.Interface, o * preferredChainName := issuer.GetSpec().ACME.PreferredChain found, preferredCertChain, err := getPreferredCertChain(ctx, cl, certURL, certSlice, preferredChainName) if err != nil { - return fmt.Errorf("error retrieving alternate chain: %w", err) + return fmt.Errorf("error retrieving preferred chain: %w", err) } if found { return c.storeCertificateOnStatus(ctx, o, preferredCertChain)