puppet-trove/manifests/quota.pp
Takashi Kajinami 2db61dcc98 quota: Stop overriding defaults
... and use the service defaults instead. Current values are based on
the old default values in trove but these were changed in trove some
time ago[1].

[1] 9e3860d54cc0fea59e80b1705c02c78cca8e1953

Change-Id: If6ba170457ca11cbd0531ff8ea1e87346b43dcc2
2024-02-03 16:44:56 +09:00

52 lines
1.8 KiB
Puppet

# == Class: trove::quota
#
# Setup and configure trove quotas.
#
# === Parameters
#
# [*max_instances_per_tenant*]
# (optional) Default maximum number of instances per tenant.
# Defaults to $facts['os_service_default'].
#
# [*max_ram_per_tenant*]
# (optional) Default maximum amount of RAM (in MB) per tenant.
# Defaults to $facts['os_service_default'].
#
# [*max_accepted_volume_size*]
# (optional) Default maximum volume size (in GB) for an instance.
# Defaults to $facts['os_service_default'].
#
# [*max_volumes_per_tenant*]
# (optional) Default maximum volume capacity (in GB) spanning across
# all Trove volumes per tenant.
# Defaults to 20.
#
# [*max_backups_per_tenant*]
# (optional) Default maximum number of backups created by a tenant.
# Defaults to $facts['os_service_default'].
#
# [*quota_driver*]
# (optional) Default driver to use for quota checks.
# Defaults to 'trove.quota.quota.DbQuotaDriver'.
#
class trove::quota (
$max_instances_per_tenant = $facts['os_service_default'],
$max_ram_per_tenant = $facts['os_service_default'],
$max_accepted_volume_size = $facts['os_service_default'],
$max_volumes_per_tenant = $facts['os_service_default'],
$max_backups_per_tenant = $facts['os_service_default'],
$quota_driver = $facts['os_service_default'],
) {
include trove::deps
trove_config {
'DEFAULT/max_instances_per_tenant': value => $max_instances_per_tenant;
'DEFAULT/max_ram_per_tenant': value => $max_ram_per_tenant;
'DEFAULT/max_accepted_volume_size': value => $max_accepted_volume_size;
'DEFAULT/max_volumes_per_tenant': value => $max_volumes_per_tenant;
'DEFAULT/max_backups_per_tenant': value => $max_backups_per_tenant;
'DEFAULT/quota_driver': value => $quota_driver;
}
}