Move IngressEditInPlaceAnnotationKey into acme API
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
parent
03e3897771
commit
536dc150ab
@ -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 (
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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"),
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user