-
Is there a way to point to no service and get 503 Service Unavailable[1] instead? That would be perfect during maintenance/(db schema) upgrade/scheduled downtime when the service is not available. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hi @meastp I see a few options:
There are a few related things: (1) (2) (3) There is no filter in the Gateway API that can return some static response like 503. https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRouteFilter |
Beta Was this translation helpful? Give feedback.
-
This reads like a desire to support custom response codes, and possibly custom responses. |
Beta Was this translation helpful? Give feedback.
Hi @meastp
I see a few options:
There are a few related things:
(1)
If you reference a non-existing service as a backend ref in an HTTPRoute, NGF (NGINX Gateway Fabric) will return 500. This is prescribed by the Gateway API here https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io%2fv1.HTTPRouteRule , field backendRefs
(2)
If the referenced Service has 0 Endpoints, NGF will return …