Files
puppet-cloudkitty/manifests/orchestrator.pp
Takashi Kajinami 70d66f8f55 [orchestrator] coordination_url should be hidden
The coordination_url option can sometimes contain secrets.

For example when redis coordination backend is used and authentication
is enabled in redis, the plain redis password is put as an URL element.

[orchestrator]
coordination_url=redis://:password@127.0.0.1:6379

Closes-Bug: #2012246
Change-Id: Iba1e7715b290ee4c104f11221e250b23936b12dc
2023-03-20 21:11:32 +09:00

40 lines
1.1 KiB
Puppet

# == Class: cloudkitty::orchestrator
#
# Setup and configure Cloudkitty orchestrator settings.
#
# === Parameters
#
# [*coordination_url*]
# (Optional) Coordination backend URL.
# Defaults to $facts['os_service_default']
#
# [*max_workers*]
# (Optional) Maximal number of workers to run.
# Defaults to $facts['os_service_default']
#
# [*max_threads*]
# (Optional) Maximal number of threads to use per worker.
# Defaults to $facts['os_service_default']
#
class cloudkitty::orchestrator (
$coordination_url = $facts['os_service_default'],
$max_workers = $facts['os_service_default'],
$max_threads = $facts['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, secret => true;
'orchestrator/max_workers': value => $max_workers_real;
'orchestrator/max_threads': value => $max_threads;
}
}