Background
There is one to one mapping between NKG and GatewayClass resource.
The GatewayClass might be invalid (ex, its controllerName doesn't match NKG controller name). The GatewayClass might not even exist.
For those cases NGK doesn't generate any NGINX configuration and as a result, NGINX will not accept any traffic.
However, NKG still processes Gateways and HTTPRoutes.
Requirements
When GatewayClass is invalid or it is doesn't exist, NGK must report Accepted (false) and appropriate reasons in the statuses of HTTPRoute resources and Gateway resources.
Figure out an appropriate Reason. Check the Gateway API first. If necessary, introduce NKG-specific reasons.
Discussed with @kate-osborn implementation approach:
if the GatewayClass doesn't exist or invalid, NKG will invalidate any listeners of the Gateway resource and report the error about the GatewayClass in the Gateway status.
As a result of invalid listeners, HTTPRoutes will not be able to attach to listeners. NKG will report already implemented invalid listener condition in the HTTPRoute statuses.
Background There is one to one mapping between NKG and GatewayClass resource.
The GatewayClass might be invalid (ex, its controllerName doesn't match NKG controller name). The GatewayClass might not even exist.
For those cases NGK doesn't generate any NGINX configuration and as a result, NGINX will not accept any traffic. However, NKG still processes Gateways and HTTPRoutes.
Requirements
When GatewayClass is invalid or it is doesn't exist, NGK must report Accepted (false) and appropriate reasons in the statuses of HTTPRoute resources and Gateway resources.
Figure out an appropriate Reason. Check the Gateway API first. If necessary, introduce NKG-specific reasons.
Acceptance Criteria
Aha! Link: https://nginx.aha.io/features/NKG-17