coordination: Expose parameters for package management

Change-Id: Ia60d3f4ef60ba28da9d5103b4bb80eefd3092331
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-10-02 15:35:51 +09:00
parent 8279174b2c
commit afd9b762a4
3 changed files with 36 additions and 10 deletions

View File

@@ -20,17 +20,29 @@
# (Optional) Maximum number of threads to use per worker.
# Defaults to 16,
#
# [*manage_backend_package*]
# (Optional) Whether to install the backend package.
# Defaults to true.
#
# [*backend_package_ensure*]
# (Optional) ensure state for backend package.
# Defaults to 'present'
#
class cloudkitty::orchestrator (
$coordination_url = $facts['os_service_default'],
$max_workers = $facts['os_workers'],
$max_workers_reprocessing = $facts['os_workers'],
$max_threads = 16,
$coordination_url = $facts['os_service_default'],
$max_workers = $facts['os_workers'],
$max_workers_reprocessing = $facts['os_workers'],
$max_threads = 16,
Boolean $manage_backend_package = true,
Stdlib::Ensure::Package $backend_package_ensure = present,
) {
include cloudkitty::deps
oslo::coordination { 'cloudkitty_config':
backend_url => $coordination_url,
manage_config => false,
backend_url => $coordination_url,
manage_backend_package => $manage_backend_package,
package_ensure => $backend_package_ensure,
manage_config => false,
}
# all coordination settings should be applied and all packages should be

View File

@@ -0,0 +1,8 @@
---
features:
- |
The following parameters have been added to
the ``cloudkitty::orchestrator`` class.
- ``manage_backend_package``
- ``backend_package_ensure``

View File

@@ -11,8 +11,10 @@ describe 'cloudkitty::orchestrator' do
is_expected.to contain_cloudkitty_config('orchestrator/coordination_url')\
.with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_oslo__coordination('cloudkitty_config').with(
:backend_url => '<SERVICE DEFAULT>',
:manage_config => false,
:backend_url => '<SERVICE DEFAULT>',
:manage_backend_package => true,
:package_ensure => 'present',
:manage_config => false,
)
is_expected.to contain_cloudkitty_config('orchestrator/max_workers').with_value(4)
is_expected.to contain_cloudkitty_config('orchestrator/max_workers_reprocessing').with_value(4)
@@ -27,6 +29,8 @@ describe 'cloudkitty::orchestrator' do
:max_workers => 4,
:max_workers_reprocessing => 5,
:max_threads => 20,
:manage_backend_package => false,
:backend_package_ensure => 'latest',
}
end
@@ -34,8 +38,10 @@ describe 'cloudkitty::orchestrator' do
is_expected.to contain_cloudkitty_config('orchestrator/coordination_url')\
.with_value('etcd3+http://127.0.0.1:2379').with_secret(true)
is_expected.to contain_oslo__coordination('cloudkitty_config').with(
:backend_url => 'etcd3+http://127.0.0.1:2379',
:manage_config => false,
:backend_url => 'etcd3+http://127.0.0.1:2379',
:manage_backend_package => false,
:package_ensure => 'latest',
:manage_config => false,
)
is_expected.to contain_cloudkitty_config('orchestrator/max_workers').with_value(4)
is_expected.to contain_cloudkitty_config('orchestrator/max_workers_reprocessing').with_value(5)