Skip to content

Commit 45bbf7e

Browse files
committed
Add request mutation fields to HTTPMirrorPolicy
Expose Envoy's RequestMirrorPolicy.host_rewrite_literal and request_headers_mutations on VirtualService HTTPMirrorPolicy via two new fields: authority: rewrites the Host (:authority) header on the mirrored request. When set, Envoy implicitly disables the default "-shadow" suffix that it would otherwise append to the Host header. headers: header manipulation rules applied to the mirrored request, reusing the existing Headers / HeaderOperations message. Only the `request` side is honored; `response` mutations have no effect since the mirrored response is discarded. These let operators retarget mirror traffic at endpoints that perform vhost-based routing, and inject/strip headers on shadow traffic (e.g. adding "x-shadow: true" or removing internal-only headers) without needing an EnvoyFilter. Note: regenerated networking/v1alpha3/virtual_service.pb.go via `buf generate` and patched kubernetes/customresourcedefinitions.gen.yaml manually for the three VirtualService CRD versions. Reviewers should re-run a full `make gen` to refresh doc and alias artifacts. Signed-off-by: Adam Buran <aburan28@gmail.com>
1 parent 8450eec commit 45bbf7e

3 files changed

Lines changed: 902 additions & 396 deletions

File tree

‎kubernetes/customresourcedefinitions.gen.yaml‎

Lines changed: 168 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)