avinetworks / avi-helm-charts

Avi Networks Helm Charts
14 stars 26 forks source link

Show relevant error when hostname dns label exceeds 63 chars #150

Open mohitevishal opened 3 years ago

mohitevishal commented 3 years ago

For hostnames, the standard limit for length is 253 octets and 63 chars per dns label.

Avi supports 63 chars per label and 253 octets max for the entire hostname(including dots). And throws the following error when the hostname exceeds 253 chars (254 in this case).

The Ingress "avi-ingress-long-hostname" is invalid: spec.rules[0].host: Invalid value: "abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1.abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1.abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1.abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklm.mydomain.com": must be no more than 253 characters

But looks like if the if the DNS label exceeds 63 chars, no relevant error is shown, the VS is never created. There are some errors in AKO pod, but none of them indicate the 63 chars limit. The Ingress simply doesn't get any IP address and no events are generated on k8s side. AKO should bubble-up this error for end-users.

Let me know if you need more details. Thanks!

sudswasavi commented 3 years ago

Hi @mohitevishal If you'd still like someone to take a look at this issue, can you pls file this issue here: https://github.com/vmware/load-balancer-and-ingress-services-for-kubernetes ? We would be retiring this repo soon in favour of the source code repo.