replicatedhq / troubleshoot

Preflight Checks and Support Bundles Framework for Kubernetes Applications
https://troubleshoot.sh
Apache License 2.0
545 stars 93 forks source link

DNS Validation in Load Balancer Collector Caps Address Length at 63 Characters Instead of 255 #1620

Open diamonwiggins opened 1 month ago

diamonwiggins commented 1 month ago

Bug Description

The function used from the Kubernetes validation library to validate DNS addresses during the preflight check for load balancer addresses imposes an unintended 63-character limit. This limit stems from the validation criteria used for pod/service DNS names, but in the case of load balancer addresses, the specified address can be up to 255 characters. The validation should allow for the full 255-character length rather than being capped at 63 characters.

Expected Behavior

Compliant DNS addresses are respected in the tcpLoadBalancer collector

Steps To Reproduce

  1. Run a preflight check for a load balancer address using an address longer than 63 characters.
  2. Observe that the validation fails despite the address being under the 255-character limit.

Additional Context

Include the following information.

chris-sanders commented 1 month ago

This is referring to: https://troubleshoot.sh/docs/host-collect-analyze/tcpLoadBalancer/