Merge "Add support for [api_settings] healthcheck_refresh_interval"

This commit is contained in:
Zuul 2021-06-28 09:43:16 +00:00 committed by Gerrit Code Review
commit a00e903ea8
3 changed files with 14 additions and 0 deletions

View File

@ -76,6 +76,10 @@
# (optional) Enable the oslo middleware healthcheck endpoint.
# Defaults to $::os_service_default
#
# [*healthcheck_refresh_interval*]
# (optional) The interval healthcheck plugin should cache results, in seconds.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*ovn_nb_connection*]
@ -100,6 +104,7 @@ class octavia::api (
$provider_drivers = $::os_service_default,
$pagination_max_limit = $::os_service_default,
$healthcheck_enabled = $::os_service_default,
$healthcheck_refresh_interval = $::os_service_default,
# DEPRECATED PARAMETERS
$ovn_nb_connection = undef
) inherits octavia::params {
@ -167,6 +172,7 @@ class octavia::api (
'api_settings/enabled_provider_drivers': value => $provider_drivers;
'api_settings/pagination_max_limit': value => $pagination_max_limit;
'api_settings/healthcheck_enabled': value => $healthcheck_enabled;
'api_settings/healthcheck_refresh_interval': value => $healthcheck_refresh_interval;
}
oslo::middleware { 'octavia_config':

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``octavia::api::healthcheck_refresh_interval`` parameter has been
added.

View File

@ -15,6 +15,7 @@ describe 'octavia::api' do
:provider_drivers => { 'amphora' => 'Octavia Amphora Driver', 'ovn' => 'Octavia OVN driver' },
:pagination_max_limit => '1000',
:healthcheck_enabled => true,
:healthcheck_refresh_interval => 5,
}
end
@ -57,6 +58,7 @@ describe 'octavia::api' do
is_expected.to contain_octavia_config('api_settings/enabled_provider_drivers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('api_settings/pagination_max_limit').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('api_settings/healthcheck_enabled').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('api_settings/healthcheck_refresh_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_oslo__middleware('octavia_config').with(
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
)
@ -77,6 +79,7 @@ describe 'octavia::api' do
is_expected.to contain_octavia_config('api_settings/enabled_provider_drivers').with_value( params[:provider_drivers] )
is_expected.to contain_octavia_config('api_settings/pagination_max_limit').with_value( params[:pagination_max_limit] )
is_expected.to contain_octavia_config('api_settings/healthcheck_enabled').with_value( params[:healthcheck_enabled] )
is_expected.to contain_octavia_config('api_settings/healthcheck_refresh_interval').with_value( params[:healthcheck_refresh_interval] )
end
[{:enabled => true}, {:enabled => false}].each do |param_hash|