Files
puppet-swift/manifests/proxy/ratelimit.pp
Adam Vinsh c659733d39 Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: I00cf4846bb933291469be94c9debed425eddf798
2016-05-25 08:52:47 -04:00

60 lines
1.3 KiB
Puppet

# == Class: swift::proxy::ratelimit
#
# Configure swift ratelimit.
#
# See Swift's ratelimit documentation for more detail about the values.
#
# === Parameters
#
# [*clock_accuracy*]
# (optional) The accuracy of swift proxy servers' clocks.
# 1000 is 1ms max difference. No rate should be higher than this.
# Defaults to 1000
#
# [*max_sleep_time_seconds*]
# (optional) Time before the app returns a 498 response.
# Defaults to 60.
#
# [*log_sleep_time_seconds*]
# (optional) if >0, enables logging of sleeps longer than
# the value.
# Defaults to 0.
#
# [*rate_buffer_seconds*]
# (optional) Time in second the rate counter can skip.
# Defaults to 5.
#
# [*account_ratelimit*]
# (optional) if >0, limits PUT and DELETE requests to containers
# Defaults to 0.
#
# == Dependencies
#
# == Examples
#
# == Authors
#
# Francois Charlier fcharlier@ploup.net
#
# == Copyright
#
# Copyright 2012 eNovance licensing@enovance.com
#
class swift::proxy::ratelimit(
$clock_accuracy = 1000,
$max_sleep_time_seconds = 60,
$log_sleep_time_seconds = 0,
$rate_buffer_seconds = 5,
$account_ratelimit = 0
) {
include ::swift::deps
concat::fragment { 'swift_ratelimit':
target => '/etc/swift/proxy-server.conf',
content => template('swift/proxy/ratelimit.conf.erb'),
order => '26',
}
}