Add parameter max_containers_per_account
This add parameters max_containers_per_account and max_containers_whitelist as new parameters. Change-Id: I15e40760340c7df123a7e3127ab40c6bc7ec7b45
This commit is contained in:
parent
82503a419f
commit
a6e9e39bbe
@ -65,6 +65,14 @@
|
||||
# (optional) If True, the proxy will log whenever it has to failover to a handoff node
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*max_containers_per_account*]
|
||||
# (optional) If set to a positive value, will limit container number per account.
|
||||
# Default to 0.
|
||||
#
|
||||
# [*max_containers_whitelist*]
|
||||
# (optional) This is a comma separated list of account hashes that ignore the max_containers_per_account cap.
|
||||
# Default to $::os_service_default.
|
||||
#
|
||||
# [*read_affinity*]
|
||||
# (optional) Configures the read affinity of proxy-server.
|
||||
# Defaults to undef.
|
||||
@ -146,6 +154,8 @@ class swift::proxy(
|
||||
$log_name = 'proxy-server',
|
||||
$cors_allow_origin = undef,
|
||||
$strict_cors_mode = true,
|
||||
$max_containers_per_account = 0,
|
||||
$max_containers_whitelist = $::os_service_default,
|
||||
$read_affinity = undef,
|
||||
$write_affinity = undef,
|
||||
$write_affinity_node_count = undef,
|
||||
@ -221,6 +231,8 @@ class swift::proxy(
|
||||
'app:proxy-server/log_handoffs': value => $log_handoffs;
|
||||
'app:proxy-server/allow_account_management': value => $allow_account_management;
|
||||
'app:proxy-server/account_autocreate': value => $account_autocreate;
|
||||
'app:proxy-server/max_containers_per_account': value => $max_containers_per_account;
|
||||
'app:proxy-server/max_containers_whitelist': value => $max_containers_whitelist;
|
||||
'app:proxy-server/write_affinity': value => $write_affinity;
|
||||
'app:proxy-server/write_affinity_node_count': value => $write_affinity_node_count;
|
||||
'app:proxy-server/node_timeout': value => $node_timeout;
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added new parameters max_containers_per_account and
|
||||
max_containers_whitelist to proxy class that can be used to configure
|
||||
the maximum authorized container number for an account.
|
@ -65,6 +65,8 @@ describe 'swift::proxy' do
|
||||
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('true') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('true') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(0) }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_whitelist').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
it { should contain_service('swift-proxy-server').with_require([
|
||||
'Class[Swift::Proxy::Healthcheck]',
|
||||
@ -104,6 +106,8 @@ describe 'swift::proxy' do
|
||||
:account_autocreate => false,
|
||||
:log_level => 'DEBUG',
|
||||
:log_name => 'swift-proxy-server',
|
||||
:max_containers_per_account => 10,
|
||||
:max_containers_whitelist => 'project1,project2',
|
||||
:read_affinity => 'r1z1=100, r1=200',
|
||||
:write_affinity => 'r1',
|
||||
:write_affinity_node_count => '2 * replicas',
|
||||
@ -132,6 +136,8 @@ describe 'swift::proxy' do
|
||||
it { should contain_swift_proxy_config('app:proxy-server/log_handoffs').with_value('true') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/allow_account_management').with_value('false') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/account_autocreate').with_value('false') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_per_account').with_value(10) }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/max_containers_whitelist').with_value('project1,project2') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/sorting_method').with_value('affinity') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/read_affinity').with_value('r1z1=100, r1=200') }
|
||||
it { should contain_swift_proxy_config('app:proxy-server/write_affinity').with_value('r1') }
|
||||
|
Loading…
Reference in New Issue
Block a user