Merge "Add max_request_body_size option support"

This commit is contained in:
Zuul
2024-03-18 16:02:35 +00:00
committed by Gerrit Code Review
3 changed files with 17 additions and 3 deletions

View File

@@ -60,6 +60,10 @@
# HTTPProxyToWSGI middleware.
# Defaults to $facts['os_service_default'].
#
# [*max_request_body_size*]
# (Optional) Set max request body size
# Defaults to $facts['os_service_default'].
#
# [*default_provider_driver*]
# (optional) Configure the default provider driver.
# Defaults to $facts['os_service_default']
@@ -135,6 +139,7 @@ class octavia::api (
$allow_tls_terminated_listeners = $facts['os_service_default'],
Boolean $sync_db = false,
$enable_proxy_headers_parsing = $facts['os_service_default'],
$max_request_body_size = $facts['os_service_default'],
$default_provider_driver = $facts['os_service_default'],
$enabled_provider_drivers = $facts['os_service_default'],
$pagination_max_limit = $facts['os_service_default'],
@@ -241,6 +246,7 @@ running as a standalone service, or httpd for being run by a httpd server")
}
oslo::middleware { 'octavia_config':
enable_proxy_headers_parsing => $enable_proxy_headers_parsing
enable_proxy_headers_parsing => $enable_proxy_headers_parsing,
max_request_body_size => $max_request_body_size,
}
}

View File

@@ -0,0 +1,4 @@
---
features:
- |
The new ``octavia::api::max_request_body_size`` option has been added.

View File

@@ -71,6 +71,7 @@ describe 'octavia::api' do
is_expected.to contain_octavia_config('api_settings/allow_prometheus_listeners').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__middleware('octavia_config').with(
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
:max_request_body_size => '<SERVICE DEFAULT>',
)
end
it 'does not sync the database' do
@@ -123,14 +124,17 @@ describe 'octavia::api' do
it { is_expected.to contain_class('octavia::db::sync') }
end
context 'with enable_proxy_headers_parsing set' do
context 'with oslo.middleware options set' do
before do
params.merge!({
:enable_proxy_headers_parsing => true})
:enable_proxy_headers_parsing => true,
:max_request_body_size => 114688,
})
end
it 'configures enable_proxy_headers_parsing' do
is_expected.to contain_oslo__middleware('octavia_config').with(
:enable_proxy_headers_parsing => true,
:max_request_body_size => 114688,
)
end
end