Commit graph

120 commits

Author SHA1 Message Date
Elvin Efendi
8b208cac93 introduce proxy_alternative_upstream_name Nginx var to differentiate canary requests 2019-07-04 19:43:20 -04:00
Elvin Efendi
0e5913310d dynamic cert mode should understand domain with trailing dot 2019-07-04 17:30:41 -04:00
Elvin Efendi
27df697dde introduce ngx.var.balancer_ewma_score 2019-07-03 16:50:22 -04:00
Elvin Efendi
b66f9e329d override least recently used entries when certificate_data dictionary is full 2019-07-01 10:18:40 -04:00
Elvin Efendi
2b46c3a056 fix monitor test after move to openresty 2019-06-24 14:21:19 -04:00
Kubernetes Prow Robot
57a0542fa3
Merge pull request #4187 from s-shirayama/add_unit_test_case_for_balancer_lua_module
Add unit test cases for balancer lua module
2019-06-13 09:02:20 -07:00
s-shirayama
6f0d6b38b8 Add unit test case for canary by header 2019-06-11 22:34:33 +09:00
s-shirayama
0ff679baa7 Add unit test case for canary by cookie 2019-06-11 22:34:30 +09:00
s-shirayama
e9f4c0bb0e Add unit test case for canary by weight 2019-06-11 22:34:24 +09:00
s-shirayama
7a15f52cf1 Add unit test case for balancer.route_to_alternative_balancer() 2019-06-11 22:34:05 +09:00
Elvin Efendi
e2c6202324 bugfix: check all previously failing upstreams, not just the last one 2019-06-07 10:00:31 -04:00
Elvin Efendi
b9b1ffb1d5 simplify sticky balancer 2019-06-06 16:32:33 -04:00
Elvin Efendi
83f2acbe38 Session Affinity ChangeOnFailure should be boolean 2019-06-06 11:22:05 -04:00
Eugene Fedunin
254629cf16 Added support for annotation session-cookie-change-on-failure
1. Session cookie is updated on previous attempt failure when `session-cookie-change-on-failure = true` (default value is `false`).
2. Added tests to check both cases.
3. Updated docs.

Co-Authored-By: Vladimir Grishin <yadolov@users.noreply.github.com>
2019-05-27 13:00:07 +03:00
Elvin Efendi
0e9e40a60b use nkeys for counting lua table elements 2019-05-26 18:15:15 -04:00
Elvin Efendi
dc7fa885a2 log info when endpoints change for a balancer 2019-05-25 23:50:18 -04:00
Elvin Efendi
93f00b2143 fix luacheck warning 2019-04-13 15:26:48 -04:00
Elvin Efendi
45add6cb7d better certificate lua unit tests 2019-04-13 14:01:44 -04:00
Elvin Efendi
42c207c548 handle default certificate correctly in Lua 2019-04-13 12:32:06 -04:00
Elvin Efendi
f067712824 better logging in certificate.lua 2019-04-13 12:32:06 -04:00
Elvin Efendi
8f81538b0d lua plugin system 2019-04-04 09:25:22 -04:00
Elvin Efendi
87e962682f properly parse x-forwarded-host 2019-03-31 15:10:45 -04:00
Elvin Efendi
496ff07bf1 replace some of the Nginx configuration to Lua code 2019-03-31 12:04:52 -04:00
Manuel Alejandro de Brito Fontes
6c1a7f1efd
Add support for IPV6 resolvers 2019-03-21 11:23:47 -03:00
Alex Kursell
d3ac73be79 Remove session-cookie-hash annotation 2019-03-04 10:34:48 -05:00
Alex Kursell
c96eae3015 Add /dbg certs command 2019-02-25 11:38:07 -05:00
Kubernetes Prow Robot
15d5ef95ef
Merge pull request #3740 from Shopify/session-annotation-reload
Fix ingress updating for session-cookie-* annotation changes
2019-02-19 15:14:21 -08:00
Alex Kursell
c180a0998b Fix session-cookie-* annotation reloading 2019-02-19 17:27:08 -05:00
Kevin Pullin
f6aded2c51 Fix DNS failures in L4 services 2019-02-17 14:12:10 -08:00
Kubernetes Prow Robot
d9845c79c5
Merge pull request #3671 from moonming/randomseed-bugfix
bugfix: fixed duplicated seeds.
2019-02-10 11:33:42 -08:00
Tim Reddehase
018a1e4d94 respond with 503 when there are no endpoints
* related to:
  * https://github.com/kubernetes/ingress-nginx/issues/3070
  * https://github.com/kubernetes/ingress-nginx/issues/3335
* add a 503 test
  * test a service that starts out empty
    (a.k.a. ingress-nginx controller (re-)start)
  * test scaling up (should route traffic accordingly)
  * test scaling down to empty service
  * use custom deployments for scaling test.
* provide a fix by updating the lua table (cache) of the configured backends
  to unset the backend if there are no endpoints available.
2019-02-03 11:43:47 +01:00
Kubernetes Prow Robot
d4d25f6fb4
Merge pull request #3619 from minherz/add-canary-header-by-value
add header-value annotation
2019-02-01 14:45:54 -08:00
minherz
57440c9464 fix issue with failing e2e tests 2019-02-01 22:11:09 +02:00
minherz
de2a1ece6d add header-value annotation
add new annotation (header-value)
parse it and propogate to lua script
alter balancer rule to include it into the canary routing logic
add e2e test to validate fallback for canary-by-header-value
add description of canary-by-header-value to documentation
2019-01-30 23:23:44 +02:00
WenMing
8ea7501d8b added more error info and keep test cases. 2019-01-21 17:32:18 +08:00
WenMing
a36961f9f9 used table functions of LuaJIT for better performance. 2019-01-19 11:16:31 +08:00
WenMing
1d37e83a18 used cjson.safe instead of pcall. 2019-01-18 23:12:22 +08:00
WenMing
c782f22c5d fixed test case for math.randomseed. 2019-01-18 10:08:33 +08:00
WenMing
011062967a bugfix: fixed duplicated seeds.
ngx.time() + ngx.worker.pid() maybe get duplicated seeds. get from /dev/urandom first.
2019-01-18 00:21:25 +08:00
Kubernetes Prow Robot
1db9c91af4
Merge pull request #3363 from skeeey/master
Document for cookie expires annotation
2019-01-14 07:52:28 -08:00
Maximilian Gaß
39dd0c50da Remove stickyness cookie domain from Lua balancer to match old behavior (#3648) 2019-01-11 22:24:45 -03:00
liuwei
7aa5834948 add cookie expires document and fix a flaw for session-cookie-expires 2019-01-11 15:35:39 +08:00
Elvin Efendi
ba7b542d78 canary by cookie should support hypen in cookie name 2019-01-08 13:15:02 -05:00
Diego Woitasen
60b983503b Consistent hashing to a subset of nodes. It works like consistent hash,
but instead of mapping to a single node, we map to a subset of nodes.
2019-01-03 01:32:52 -03:00
Elvin Efendi
4896b064ca lua randomseed per worker 2018-12-20 17:09:29 +04:00
Kubernetes Prow Robot
ee3a8fe581
Merge pull request #3505 from Shopify/watch-pod-lua
Update lua configuration_data when number of controller pod change
2018-12-17 00:10:30 -08:00
Maxime Ginters
f90881b367 Update lua configuration_data when number of controller pod change 2018-12-14 13:34:54 -05:00
Maxime Ginters
ff8bfb6a86 Fix --enable-dynamic-certificates for nested subdomain 2018-12-12 09:16:39 -05:00
Fabian Topfstedt
f03c8a8544 testing that a secure cookie gets set when being in ssl mode
Signed-off-by: Fabian Topfstedt <topfstedt@schneevonmorgen.com>
2018-12-06 09:08:25 +01:00
Fabian Topfstedt
6c46adf2b7 reverted changing $https globally in the unit tests
Signed-off-by: Fabian Topfstedt <topfstedt@schneevonmorgen.com>
2018-12-06 09:01:08 +01:00