Files
puppet-cloudkitty/manifests/orchestrator.pp
Takashi Kajinami bd9098ec87 Support more [orchestrator] parameters
This change introduces a separate new class to manage [orchestrator]
parameters. The max_workers parameter in the processor class is
deprecated in favor of that new class.

Change-Id: Icd30923802064aec6a3ae9716b2ae30665998aae
2022-02-13 21:20:15 +09:00

40 lines
1.0 KiB
Puppet

# == Class: cloudkitty::orchestrator
#
# Setup and configure Cloudkitty orchestrator settings.
#
# === Parameters
#
# [*coordination_url*]
# (Optional) Coordination backend URL.
# Defaults to $::os_service_default
#
# [*max_workers*]
# (Optional) Maximal number of workers to run.
# Defaults to $::os_service_default
#
# [*max_threads*]
# (Optional) Maximal numer of threads to use per worker.
# Defaults to $::os_service_default
#
class cloudkitty::orchestrator (
$coordination_url = $::os_service_default,
$max_workers = $::os_service_default,
$max_threads = $::os_service_default
) {
include cloudkitty::deps
$max_workers_real = pick($::cloudkitty::processor::max_workers, $max_workers)
oslo::coordination{ 'cloudkitty_config':
backend_url => $coordination_url,
manage_config => false,
}
cloudkitty_config {
'orchestrator/coordination_url': value => $coordination_url;
'orchestrator/max_workers': value => $max_workers_real;
'orchestrator/max_threads': value => $max_threads;
}
}