Remove 'IngressKey' from certmanager API in favour of a single const

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
JoshVanL 2019-10-02 10:04:55 +01:00
parent 5bb452f6e9
commit 259efac9bd
2 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -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)