From 259efac9bd06d6b7cc5fe01990efc8a53733ae20 Mon Sep 17 00:00:00 2001 From: JoshVanL Date: Wed, 2 Oct 2019 10:04:55 +0100 Subject: [PATCH] Remove 'IngressKey' from certmanager API in favour of a single const Signed-off-by: JoshVanL --- pkg/apis/certmanager/v1alpha2/types.go | 12 ++++-------- pkg/issuer/acme/http/ingress.go | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pkg/apis/certmanager/v1alpha2/types.go b/pkg/apis/certmanager/v1alpha2/types.go index 977b7dc76..f47571481 100644 --- a/pkg/apis/certmanager/v1alpha2/types.go +++ b/pkg/apis/certmanager/v1alpha2/types.go @@ -42,14 +42,10 @@ const ( // if the challenge type is set to http01 IngressACMEIssuerHTTP01IngressClassAnnotationKey = "acme.cert-manager.io/http01-ingress-class" - IngressClassAnnotationKey = IngressKey -) - -const ( - // IngressKey picks a specific "class" for the Ingress. - // The controller only processes Ingresses with this annotation either - // unset, or set to either the configured value or the empty string. - IngressKey = "kubernetes.io/ingress.class" + // IngessClassAnnotationKey picks a specific "class" for the Ingress. The + // controller only processes Ingresses with this annotation either unset, or + // set to either the configured value or the empty string. + IngressClassAnnotationKey = "kubernetes.io/ingress.class" ) // Annotation names for CertificateRequests diff --git a/pkg/issuer/acme/http/ingress.go b/pkg/issuer/acme/http/ingress.go index 6b3ac1cad..847622aa8 100644 --- a/pkg/issuer/acme/http/ingress.go +++ b/pkg/issuer/acme/http/ingress.go @@ -130,7 +130,7 @@ func buildIngressResource(ch *cmacme.Challenge, svcName string) (*extv1beta1.Ing ingAnnotations["nginx.ingress.kubernetes.io/whitelist-source-range"] = "0.0.0.0/0,::/0" if ingClass != nil { - ingAnnotations[cmapi.IngressKey] = *ingClass + ingAnnotations[cmapi.IngressClassAnnotationKey] = *ingClass } ingPathToAdd := ingressPath(ch.Spec.Token, svcName)