diff --git a/rootfs/etc/nginx/lua/balancer/chash.lua b/rootfs/etc/nginx/lua/balancer/chash.lua index d9108a8b3..ffd9f54e0 100644 --- a/rootfs/etc/nginx/lua/balancer/chash.lua +++ b/rootfs/etc/nginx/lua/balancer/chash.lua @@ -9,6 +9,8 @@ function _M.new(self, backend) local o = { instance = self.factory:new(nodes), hash_by = backend["upstream-hash-by"], + traffic_shaping_policy = backend.trafficShapingPolicy, + alternative_backends = backend.alternativeBackends, } setmetatable(o, self) self.__index = self diff --git a/rootfs/etc/nginx/lua/balancer/ewma.lua b/rootfs/etc/nginx/lua/balancer/ewma.lua index 8e4512000..0ab4e6544 100644 --- a/rootfs/etc/nginx/lua/balancer/ewma.lua +++ b/rootfs/etc/nginx/lua/balancer/ewma.lua @@ -120,6 +120,8 @@ end function _M.new(self, backend) local o = { peers = backend.endpoints, + traffic_shaping_policy = backend.trafficShapingPolicy, + alternative_backends = backend.alternativeBackends, } setmetatable(o, self) self.__index = self diff --git a/rootfs/etc/nginx/lua/balancer/round_robin.lua b/rootfs/etc/nginx/lua/balancer/round_robin.lua index db6c8e7dd..46641363e 100644 --- a/rootfs/etc/nginx/lua/balancer/round_robin.lua +++ b/rootfs/etc/nginx/lua/balancer/round_robin.lua @@ -8,6 +8,8 @@ function _M.new(self, backend) local nodes = util.get_nodes(backend.endpoints) local o = { instance = self.factory:new(nodes), + traffic_shaping_policy = backend.trafficShapingPolicy, + alternative_backends = backend.alternativeBackends, } setmetatable(o, self) self.__index = self diff --git a/rootfs/etc/nginx/lua/balancer/sticky.lua b/rootfs/etc/nginx/lua/balancer/sticky.lua index c61cef446..de9a557bc 100644 --- a/rootfs/etc/nginx/lua/balancer/sticky.lua +++ b/rootfs/etc/nginx/lua/balancer/sticky.lua @@ -18,6 +18,8 @@ function _M.new(self, backend) cookie_expires = backend["sessionAffinityConfig"]["cookieSessionAffinity"]["expires"], cookie_max_age = backend["sessionAffinityConfig"]["cookieSessionAffinity"]["maxage"], digest_func = digest_func, + traffic_shaping_policy = backend.trafficShapingPolicy, + alternative_backends = backend.alternativeBackends, } setmetatable(o, self) self.__index = self