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

Support a "from" field in targetRef for policy attachment

Open LiorLieberman opened this issue 6 months ago • 1 comments

What would you like to be added: A new from field to PolicyTargetReference that will help narrowing down policy scopes based on "from" where the packet arrived.

Why this is needed: The idea of adding a from field has been brought up a few times already. The two most recent examples are the Retry Budget GEP, and BackendTLSPolicy enahcements.

It is useful in many use cases such as:

  • A backendTLSPolicy thats applied to traffic thats destined to a target only if it came from HTTPRoute X, from Gateway Y, or from impl specific CustomResource
  • A retry budget config thats only applicable for traffic coming from Gateway foo or from Mesh
  • Supporting shared Policies across different implementations, where some implementations may not support all fields, and scoping by from enables graceful degradation or compatibility.

LiorLieberman avatar Jun 12 '25 20:06 LiorLieberman

This has come up a few times before, and I can see the uses.

But it does add yet another dimension to the "possible effective Policy" calculations. We need to be sure that the utility gained is worth the additional complexity cost we're adding to something that's already pretty complex.

youngnick avatar Jun 13 '25 05:06 youngnick

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 Sep 11 '25 06:09 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 Oct 11 '25 07:10 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 Nov 10 '25 08:11 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 Nov 10 '25 08:11 k8s-ci-robot