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

Docs: RequestMirror filter needs to be documented

Open robscott opened this issue 1 year ago • 6 comments

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.

robscott avatar Dec 08 '23 01:12 robscott

                          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

soudiv avatar Dec 08 '23 10:12 soudiv

If this supports set or remove action, that can be added too

soudiv avatar Dec 08 '23 10:12 soudiv

/assign @soudiv

robscott avatar Dec 08 '23 16:12 robscott

Attached is a draft and the updated one is shared

soudiv avatar Dec 09 '23 00:12 soudiv

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Mar 08 '24 00:03 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Apr 07 '24 00:04 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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 avatar May 07 '24 01:05 k8s-triage-robot

@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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

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.

k8s-ci-robot avatar May 07 '24 01:05 k8s-ci-robot