Merge pull request #6546 from nic-6443/ewma-cananry-fix

bugfix: update trafficShapingPolicy not working in ewma load-balance
This commit is contained in:
Kubernetes Prow Robot 2020-12-11 03:29:23 -08:00 committed by GitHub
commit baf2afc5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,6 +193,9 @@ function _M.after_balance(_)
end
function _M.sync(self, backend)
self.traffic_shaping_policy = backend.trafficShapingPolicy
self.alternative_backends = backend.alternativeBackends
local normalized_endpoints_added, normalized_endpoints_removed =
util.diff_endpoints(self.peers, backend.endpoints)
@ -203,8 +206,6 @@ function _M.sync(self, backend)
ngx_log(INFO, string_format("[%s] peers have changed for backend %s", self.name, backend.name))
self.traffic_shaping_policy = backend.trafficShapingPolicy
self.alternative_backends = backend.alternativeBackends
self.peers = backend.endpoints
for _, endpoint_string in ipairs(normalized_endpoints_removed) do