gateway-api
gateway-api copied to clipboard
Docs: RequestMirror filter needs to be documented
What would you like to be added: A new guide showing how to mirror HTTP requests with HTTPRoute. This guide should be similar to https://gateway-api.sigs.k8s.io/guides/http-header-modifier/ or https://gateway-api.sigs.k8s.io/guides/traffic-splitting/.
For an example of how to configure our RequestMirror filter, you can refer to the relevant conformance test:
https://github.com/kubernetes-sigs/gateway-api/blob/195d9882f816c9002eede96b2eda171ac454a6c1/conformance/tests/httproute-request-mirror.yaml#L42-L47
Why this is needed: We are currently lacking documentation for request mirroring.
Mirroring HTTP requests using HTTPRoute
Mirroring HTTP requests using HTTPRoute in Kubernetes Gateway API is a technique where a copy of incoming requests is sent to a secondary service for testing or analysis, without impacting the primary service handling these requests. The filter available to meet the requirement is requestMirror
This guide shows how to use these features.
To mirror a HTTP request, use a filter of the type RequestMirror, with the backendRef action and the name, namespace and port of the request:
apiVersion: gateway.networking.k8s.io/v1beta1 kind: HTTPRoute metadata: name: Mirroring-http-request spec: parentRefs: - name: acme-gw rules: - matches: - path: type: PathPrefix value: /add-a-request-header filters: - type: RequestMirror requestMirror: backendRef: name: infra-backend-v2 namespace: gateway-conformance-infra port: 8080
If this supports set or remove action, that can be added too
/assign @soudiv
Attached is a draft and the updated one is shared
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.