Add event_time_to_live for panko config
By default panko keeps data for ever, exposing this will help user tweak this setting and expire data periodically. Partial-Bug: #1746514 Change-Id: Iac1b0def39a4beb9b0f86ad306a991d7822e8b4e
This commit is contained in:
parent
1f0e978bc1
commit
ae02d117bb
@ -71,6 +71,11 @@
|
||||
# (Optional) The name of the index in Elasticsearch (string value).
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*event_time_to_live*]
|
||||
# (Optional) Number of seconds that events are kept in the database for
|
||||
# (<= 0 means forever)
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
class panko::api (
|
||||
$manage_service = true,
|
||||
$enabled = true,
|
||||
@ -87,6 +92,7 @@ class panko::api (
|
||||
$retry_interval = $::os_service_default,
|
||||
$es_ssl_enabled = $::os_service_default,
|
||||
$es_index_name = $::os_service_default,
|
||||
$event_time_to_live = $::os_service_default,
|
||||
) inherits panko::params {
|
||||
|
||||
warning('This Class is deprecated and will be removed in future releases.')
|
||||
@ -140,14 +146,15 @@ running as a standalone service, or httpd for being run by a httpd server")
|
||||
}
|
||||
|
||||
panko_config {
|
||||
'api/host': value => $host;
|
||||
'api/port': value => $port;
|
||||
'api/workers': value => $workers;
|
||||
'api/max_limit': value => $max_limit;
|
||||
'storage/max_retries': value => $max_retries;
|
||||
'storage/retry_interval': value => $retry_interval;
|
||||
'storage/es_ssl_enabled': value => $es_ssl_enabled;
|
||||
'storage/es_index_name': value => $es_index_name;
|
||||
'api/host': value => $host;
|
||||
'api/port': value => $port;
|
||||
'api/workers': value => $workers;
|
||||
'api/max_limit': value => $max_limit;
|
||||
'storage/max_retries': value => $max_retries;
|
||||
'storage/retry_interval': value => $retry_interval;
|
||||
'storage/es_ssl_enabled': value => $es_ssl_enabled;
|
||||
'storage/es_index_name': value => $es_index_name;
|
||||
'database/event_time_to_live': value => $event_time_to_live;
|
||||
}
|
||||
|
||||
if $auth_strategy == 'keystone' {
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Add event_time_to_live to panko config so user can tweak and expire data
|
||||
instead of keeping for ever.
|
@ -11,16 +11,17 @@ describe 'panko::api' do
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '8977',
|
||||
:max_limit => '1000',
|
||||
:host => '0.0.0.0',
|
||||
:max_retries => '10',
|
||||
:retry_interval => '20',
|
||||
:es_ssl_enabled => true,
|
||||
:es_index_name => 'panko',
|
||||
{ :enabled => true,
|
||||
:manage_service => true,
|
||||
:package_ensure => 'latest',
|
||||
:port => '8977',
|
||||
:max_limit => '1000',
|
||||
:host => '0.0.0.0',
|
||||
:max_retries => '10',
|
||||
:retry_interval => '20',
|
||||
:es_ssl_enabled => true,
|
||||
:es_index_name => 'panko',
|
||||
:event_time_to_live => '3600',
|
||||
}
|
||||
end
|
||||
|
||||
@ -48,6 +49,7 @@ describe 'panko::api' do
|
||||
is_expected.to contain_panko_config('storage/es_ssl_enabled').with_value(params[:es_ssl_enabled])
|
||||
is_expected.to contain_panko_config('storage/es_index_name').with_value(params[:es_index_name])
|
||||
is_expected.to contain_panko_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_panko_config('database/event_time_to_live').with_value( params[:event_time_to_live] )
|
||||
end
|
||||
|
||||
[{:enabled => true}, {:enabled => false}].each do |param_hash|
|
||||
|
Loading…
Reference in New Issue
Block a user