Closed bennesp closed 4 months ago
We should probably support leaving an empty host value, to allow routing all traffic through that ingress rule, as defined in the spec: https://github.com/kubernetes/api/blob/master/networking/v1/types.go#L397-L399
If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
However, a host value of '*' is disallowed (but the behavior you are looking for is covered by the empty-host case anyway): https://github.com/kubernetes/api/blob/master/networking/v1/types.go#L401-L405
host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. ".foo.com"). The wildcard character '' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*").
What happened?
Not writing any
host
in theIngress
resource results intopomerium
not accepting theIngress
because:What did you expect to happen?
Ingress specification allows to avoid specifying the
host
field, since it's optional.Since Pomerium supports wildcard (https://github.com/pomerium/pomerium/pull/4131) the ingress controller should be able to map the absence of the
host
field to a*
host.It cannot be manually done because the
host
insideIngress
, if provided, must conform to a regex that do not allow to use just*
:\*\.[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*
How'd it happen?
Create a simple Ingress with no host:
What's your environment like?
pomerium --version
): v0.25.1What's your config.yaml?