gateway-api icon indicating copy to clipboard operation
gateway-api copied to clipboard

`ControllerName` validation helper

Open mlavacca opened this issue 3 years ago • 1 comments

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.

mlavacca avatar Sep 27 '22 10:09 mlavacca

/assign

mlavacca avatar Sep 27 '22 12:09 mlavacca