EnvoyFilter: implement targetRefs#3160
Merged
istio-testing merged 1 commit intoistio:masterfrom Apr 12, 2024
Merged
Conversation
This is the only API we have a `selector` without `targetRef`. The motivation at the time was that waypoints don't official support EnvoyFilter, and targetRef was primarily for waypoints. However, targetRef can be used with all Kubernetes Gateway, including for ingress, where EnvoyFilter is supported. Also, long term it will support waypoint as well I assume; the earlier we add the field the less migration pain there is. This PR goes directly to `targetRefs` in line with istio#3159.
Contributor
|
Looks good to me, makes a lot of sense. BTW - worth taking a look at https://gateway.envoyproxy.io/v0.5.0/design/extending-envoy-gateway/ and https://gateway.envoyproxy.io/v0.5.0/design/envoy-patch-policy/ - while we are commited to never promote EnvoyFilter to v1, we can support APIs defined by other orgs or work with others to standardize common extensions for Envoy-based gateways. |
costinm
approved these changes
Apr 12, 2024
keithmattix
approved these changes
Apr 12, 2024
| // This is to prevent proxies connected to older control planes (that don't know about the `targetRefs` field) | ||
| // from misinterpreting the policy as namespace-wide during the upgrade process. | ||
| // | ||
| // NOTE: Waypoint proxies are required to use this field for policies to apply; `selector` policies will be ignored. |
Contributor
There was a problem hiding this comment.
nit: I don't think this is true yet; it's still behind a feature flag: https://github.com/istio/istio/blob/3ddb82391650bcff9808600c0af73b1101f88d0d/pilot/pkg/features/pilot.go#L216
ericvn
approved these changes
Apr 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the only API we have a
selectorwithouttargetRef.The motivation at the time was that waypoints don't official support
EnvoyFilter, and targetRef was primarily for waypoints.
However, targetRef can be used with all Kubernetes Gateway, including
for ingress, where EnvoyFilter is supported. Also, long term it will
support waypoint as well I assume; the earlier we add the field the less
migration pain there is.
This PR goes directly to
targetRefsin line with#3159.