cert-manager / cert-manager

Automatically provision and manage TLS certificates in Kubernetes
https://cert-manager.io
Apache License 2.0
12.18k stars 2.1k forks source link

Need to be able to add annotations to nginx-ingress for compliance #6148

Closed tibers closed 1 year ago

tibers commented 1 year ago

Is your feature request related to a problem? Please describe.

Unfortunately I have to annotate all the ingresses we create in our shared cluster.

I know the gatekeeper thing isn't your problem, but I do need a mechanism by which I can add those annotations to the ingress.

The error is as follows:

  Warning  PresentError  102s (x2365 over 21m)  cert-manager-challenges  (combined from similar events): Error presenting challenge: admission webhook "validation.gatekeeper.sh" denied the request: [azurepolicy-k8sazurev
1ingresshttpsonly-7327ab23cc31258e5d26] Ingress should allow https only. tls configuration and annotation nginx.ingress.kubernetes.io/force-ssl-redirect=true are required for cm-acme-http-solver-fjj9t
[azurepolicy-k8sazurev1ingresshttpsonly-81621d57eaa52baa4465] Ingress should allow https only. tls configuration and annotation nginx.ingress.kubernetes.io/force-ssl-redirect=true are required for cm-acme-http-solver-fjj
9t

This failure occurs when using HTTP01 solvers.

Describe the solution you'd like

Give me a way to add annotations to the ingress.

Describe alternatives you've considered

Additional context

Environment details (remove if not applicable):

Helm on chart version 4.7.0

/kind feature

tibers commented 1 year ago

ah ha! https://cert-manager.io/docs/configuration/acme/http01/#ingresstemplate