gateway-api
gateway-api copied to clipboard
`ControllerName` validation helper
What would you like to be added:
The GatewayClass ControllerName validation is enforced at the CRD level through the following regex:
^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
Since the controllerName is a field that may be used by the implementations to check that the GatewayClass has to be reconciled by the controller itself, it would be beneficial to provide a helper for checking its validity. This helper could be added under apis/v1beta1/validation or apis/v1beta1/util/validation
Why this is needed:
This is needed to provide a helper to check the ControllerName validity by the various implementations.
/assign