diff --git a/pkg/apis/acme/v1alpha2/types.go b/pkg/apis/acme/v1alpha2/types.go index 72a7211f3..b15310611 100644 --- a/pkg/apis/acme/v1alpha2/types.go +++ b/pkg/apis/acme/v1alpha2/types.go @@ -31,6 +31,10 @@ const ( // classes into a single cluster that want to be able to re-use a single // solver for each ingress class. ACMECertificateHTTP01IngressClassOverride = "acme.cert-manager.io/http01-override-ingress-class" + + // IngressEditInPlaceAnnotation is used to toggle the use of ingressClass instead + // of ingress on the created Certificate resource + IngressEditInPlaceAnnotationKey = "acme.cert-manager.io/http01-edit-in-place" ) const ( diff --git a/pkg/apis/certmanager/v1alpha2/types.go b/pkg/apis/certmanager/v1alpha2/types.go index 9d81d9a18..70afc23a0 100644 --- a/pkg/apis/certmanager/v1alpha2/types.go +++ b/pkg/apis/certmanager/v1alpha2/types.go @@ -29,9 +29,6 @@ const ( ) const ( - // editInPlaceAnnotation is used to toggle the use of ingressClass instead - // of ingress on the created Certificate resource - IngressEditInPlaceAnnotationKey = "acme.cert-manager.io/http01-edit-in-place" // issuerNameAnnotation can be used to override the issuer specified on the // created Certificate resource. IngressIssuerNameAnnotationKey = "cert-manager.io/issuer" diff --git a/pkg/controller/ingress-shim/sync.go b/pkg/controller/ingress-shim/sync.go index c428afb17..5e93448cb 100644 --- a/pkg/controller/ingress-shim/sync.go +++ b/pkg/controller/ingress-shim/sync.go @@ -278,7 +278,7 @@ func (c *controller) setIssuerSpecificConfig(crt *cmapi.Certificate, ing *extv1b } // for ACME issuers - editInPlaceVal, _ := ingAnnotations[cmapi.IngressEditInPlaceAnnotationKey] + editInPlaceVal, _ := ingAnnotations[cmacme.IngressEditInPlaceAnnotationKey] editInPlace := editInPlaceVal == "true" if editInPlace { if crt.Annotations == nil { diff --git a/pkg/controller/ingress-shim/sync_test.go b/pkg/controller/ingress-shim/sync_test.go index bf6637d74..2c7542557 100644 --- a/pkg/controller/ingress-shim/sync_test.go +++ b/pkg/controller/ingress-shim/sync_test.go @@ -111,7 +111,7 @@ func TestSync(t *testing.T) { }, Annotations: map[string]string{ cmapi.IngressClusterIssuerNameAnnotationKey: "issuer-name", - cmapi.IngressEditInPlaceAnnotationKey: "true", + cmacme.IngressEditInPlaceAnnotationKey: "true", }, UID: types.UID("ingress-name"), }, @@ -162,7 +162,7 @@ func TestSync(t *testing.T) { }, Annotations: map[string]string{ cmapi.IngressClusterIssuerNameAnnotationKey: "issuer-name", - cmapi.IngressEditInPlaceAnnotationKey: "true", + cmacme.IngressEditInPlaceAnnotationKey: "true", }, UID: types.UID("ingress-name"), }, @@ -337,7 +337,7 @@ func TestSync(t *testing.T) { Annotations: map[string]string{ cmapi.IngressClusterIssuerNameAnnotationKey: "issuer-name", cmapi.IngressClassAnnotationKey: "nginx-ing", - cmapi.IngressEditInPlaceAnnotationKey: "false", + cmacme.IngressEditInPlaceAnnotationKey: "false", }, UID: types.UID("ingress-name"), },