api: add ipTagging to ClientTrafficPolicy #10741
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 481 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.370
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #10741"
general
weight: 0.35
zirain
What this PR does / why we need it:
This is an API proposal PR introducing
ipTaggingunderClientTrafficPolicy.specto expose Envoy's IP Tagging HTTPfilter (envoy.extensions.filters.http.ip_tagging.v3.IPTagging).With
ipTagging, Gateway operators can match incoming client IPs (resolved viaclientIPDetection) against IPv4/IPv6 CIDR lists and attach semantic tag headers (defaultx-envoy-ip-tags) for downstream processing—such asHTTPRouteheader-based routing,BackendTrafficPolicyrate-limit rules, authorization, or upstream inspection—while sanitizing untrusted client-supplied tag headers by default.Proposed API Summary (
api/v1alpha1/clienttrafficpolicy_types.go)ClientTrafficPolicySpec.ipTagging(IPTagging, optional):requestType(IPTaggingRequestType, optional, defaultBoth):Both,Internal, orExternal.header(IPTaggingHeader, optional):-
name(string, optional, pattern^[A-Za-z0-9-]+$): custom header name (defaults tox-envoy-ip-tagsin Envoy when unset).-
action(*IPTaggingHeaderAction, optional, defaultSanitize):SanitizeorAppend.ipTags([]IPTag, required,MinItems=1,+listType=map,+listMapKey=name):-
name(string, required, length 1–256): unique tag name.-
cidrs([]CIDR, required,MinItems=1): IPv4/IPv6 CIDR ranges mapped toname.Scope & Follow-up
test/cel-validation/clienttrafficpolicy_test.go) for API review first. - IR/GatewayAPI/xDS translation (internal/ir,internal/gatewayapi,internal/xds/translator) andfile-basedip_tags_datasourceare intentionally deferred to follow-up implementation once the API is agreed upon.Which issue(s) this PR fixes:
Relates to #5198
---
PR Checklist
git commit -s). See DCO: Sign your work./api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.make generate gen-check,make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, butgen-check,lint, and coverage MUST pass.)docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
make gen-checkand committed the result if API/helm charts/modules changed.release-notes/current/breaking_changes/.