@@ -71,7 +71,7 @@ def test_nginx_config_defaults(self, kube_apis, ingress_controller_prerequisites
71
71
assert "proxy_read_timeout 60s;" in config
72
72
assert "proxy_send_timeout 60s;" in config
73
73
74
- assert "max_fails=1 fail_timeout=10s;" in config
74
+ assert "max_fails=1 fail_timeout=10s max_conns=0 ;" in config
75
75
76
76
assert "keepalive" not in config
77
77
assert 'proxy_set_header Connection "";' not in config
@@ -81,7 +81,7 @@ def test_nginx_config_defaults(self, kube_apis, ingress_controller_prerequisites
81
81
"fail-timeout" : "13s" , "connect-timeout" : "55s" , "read-timeout" : "1s" , "send-timeout" : "1h" ,
82
82
"keepalive" : 54 },
83
83
["least_conn;" , "max_fails=8 " ,
84
- "fail_timeout=13s;" , "proxy_connect_timeout 55s;" , "proxy_read_timeout 1s;" , "proxy_send_timeout 1h;" ,
84
+ "fail_timeout=13s " , "max_conns=0 ;" , "proxy_connect_timeout 55s;" , "proxy_read_timeout 1s;" , "proxy_send_timeout 1h;" ,
85
85
"keepalive 54;" , 'proxy_set_header Connection "";' ]),
86
86
({"lb-method" : "ip_hash" , "connect-timeout" : "75" , "read-timeout" : "15" , "send-timeout" : "1h" },
87
87
["ip_hash;" , "proxy_connect_timeout 75;" , "proxy_read_timeout 15;" , "proxy_send_timeout 1h;" ]),
@@ -121,11 +121,11 @@ def test_when_option_in_v_s_only(self, kube_apis, ingress_controller_prerequisit
121
121
122
122
@pytest .mark .parametrize ('config_map_file, expected_strings, unexpected_strings' , [
123
123
(f"{ TEST_DATA } /virtual-server-upstream-options/configmap-with-keys.yaml" ,
124
- ["max_fails=3 " , "fail_timeout=33s;" ,
124
+ ["max_fails=3 " , "fail_timeout=33s " , "max_conns=0 ;" ,
125
125
"proxy_connect_timeout 44s;" , "proxy_read_timeout 22s;" , "proxy_send_timeout 55s;" ,
126
126
"keepalive 1024;" , 'proxy_set_header Connection "";' ],
127
127
["ip_hash;" , "least_conn;" , "random " , "hash" , "least_time " ,
128
- "max_fails=1 " , "fail_timeout=10s;" ,
128
+ "max_fails=1 " , "fail_timeout=10s " , "max_conns=1s ;" ,
129
129
"proxy_connect_timeout 60s;" , "proxy_read_timeout 60s;" , "proxy_send_timeout 60s;" ]),
130
130
])
131
131
def test_when_option_in_config_map_only (self , kube_apis , ingress_controller_prerequisites ,
@@ -166,10 +166,10 @@ def test_when_option_in_config_map_only(self, kube_apis, ingress_controller_prer
166
166
"fail-timeout" : "1m" , "connect-timeout" : "1m" , "read-timeout" : "77s" , "send-timeout" : "23s" ,
167
167
"keepalive" : 48 },
168
168
["least_conn;" , "max_fails=12 " ,
169
- "fail_timeout=1m;" , "proxy_connect_timeout 1m;" , "proxy_read_timeout 77s;" , "proxy_send_timeout 23s;" ,
169
+ "fail_timeout=1m " , "max_conns=0 ;" , "proxy_connect_timeout 1m;" , "proxy_read_timeout 77s;" , "proxy_send_timeout 23s;" ,
170
170
"keepalive 48;" , 'proxy_set_header Connection "";' ],
171
171
["ip_hash;" , "random " , "hash" , "least_time " , "max_fails=1 " ,
172
- "fail_timeout=10s;" , "proxy_connect_timeout 44s;" , "proxy_read_timeout 22s;" , "proxy_send_timeout 55s;" ,
172
+ "fail_timeout=10s " , "max_conns=33s ;" , "proxy_connect_timeout 44s;" , "proxy_read_timeout 22s;" , "proxy_send_timeout 55s;" ,
173
173
"keepalive 1024;" ])
174
174
])
175
175
def test_v_s_overrides_config_map (self , kube_apis , ingress_controller_prerequisites ,
0 commit comments