-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#564 Implemented adding a header for locality weighted load balancing…
… (set on response)
- Loading branch information
1 parent
6cc83a1
commit e6e9c31
Showing
3 changed files
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
7 changes: 2 additions & 5 deletions
7
envoy-control-core/src/main/resources/lua/ingress_current_zone_header.lua
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
function envoy_on_request(handle) | ||
local traffic_splitting_zone_header_name = handle:metadata():get("traffic_splitting_zone_header_name") or "" | ||
function envoy_on_response(handle) | ||
local traffic_splitting_zone_header_name = handle:metadata():get("traffic_splitting_zone_header_name") or "" | ||
local current_zone = handle:metadata():get("current_zone") or "" | ||
if traffic_splitting_zone_header_name == "" then | ||
return | ||
end | ||
handle:headers():add(traffic_splitting_zone_header_name, current_zone) | ||
end | ||
|
||
function envoy_on_response(handle) | ||
end |
This file contains 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