Reconsider error condition on empty secretnames in TLS hosts. #4235
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/rotten
Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Is your feature request related to a problem? Please describe.
In our cluster, we provide wildcard certificates via ingress-nginx's default certificate functionality. The documentation states:
There appears to be some disagreement between nginx's interpretation of the Ingress spec and cert-manager here. One of our goals is to use the certificate shim to manage only a subset of the TLS hostnames - ideally, only those that have a
secretName
specified.E.g. our hosts section typically looks like:
This kinda/sorta works today - cert manager ignores the the TLS blocks with empty secretnames but does produce error logs / events. It doesn't inspire complete confidence that this behavior will be supported in the future and that this only works incidentally rather than being an explicit choice.
Describe the solution you'd like
Describe alternatives you've considered
If we do specify the secretName (e.g. cluster-wildcard-tls) like so:
Cert-manager will try to create this certificate with the non-wildcard DNS name. To get around this in the past, we typically pre-provisioned the namespace with an explicit
cluster-wildcard-tls
certificate resource specifying our wildcard record before any ingresses were created. This had proven problematic - if, for whatever reason (e.g. a newly created namespace is created) this certificate doesn't exist and a new ingress appears cert manager will create it and "squat" on it with the wrong configuration.Additionally, we tried omitting the tls block for the DNS name we want to map to the wildcard record entirely. In this case ingress-nginx simply omits TLS for the hostname entirely. Arguably, this is an issue with ingress-nginx.
Additional context
The wildcard hostnames are typically used to help service owners hit the ground running with a working hostname ASAP. Once a service is ready for prime time, folks typically create "vanity" DNS names that provide some additional indirection (e.g. we ellide the cluster name from this record).
Environment details (remove if not applicable):
/kind feature
The text was updated successfully, but these errors were encountered: