puppet-swift/manifests/proxy/slo.pp
Adam Vinsh 60ed2ee79c Replace proxy concat/template with ini provider
Maintains full backward compatibility.
Use swift_proxy_config ini provider to mange proxy-server.conf.
Remove all erb templates. Move all template logic into proxy
middleware classes. To purge proxy.conf of settings that are
not specified set the new paramater "purge_config" to "true".

Change-Id: I0a143cf812043ea0f9a008a6e5c60ec87f9a4e9a
2016-10-06 10:29:04 -04:00

64 lines
1.6 KiB
Puppet

#
# Configure swift slo.
#
# == Examples
#
# include swift::proxy::slo
#
# == Parameters
#
# [*max_manifest_segments*]
# Max manifest segments.
# Default to 1000.
#
# [*max_manifest_size*]
# Max manifest size.
# Default to 2097152.
#
# [*min_segment_size*]
# minimal segment size
# Default to 1048576.
#
# [*rate_limit_after_segment*]
# Start rate-limiting SLO segment serving after the Nth segment of a segmented object.
# Default to 10.
#
# [*rate_limit_segments_per_sec*]
# Once segment rate-limiting kicks in for an object, limit segments served to N per second.
# 0 means no rate-limiting.
# Default to 0.
#
# [*max_get_time*]
# Time limit on GET requests (seconds).
# Default to 86400.
#
# == Authors
#
# Xingchao Yu yuxcer@gmail.com
#
# == Copyright
#
# Copyright 2014 UnitedStack licensing@unitedstack.com
#
class swift::proxy::slo (
$max_manifest_segments = '1000',
$max_manifest_size = '2097152',
$min_segment_size = '1048576',
$rate_limit_after_segment = '10',
$rate_limit_segments_per_sec = '0',
$max_get_time = '86400'
) {
include ::swift::deps
swift_proxy_config {
'filter:slo/use': value => 'egg:swift#slo';
'filter:slo/max_manifest_segments': value => $max_manifest_segments;
'filter:slo/max_manifest_size': value => $max_manifest_size;
'filter:slo/min_segment_size': value => $min_segment_size;
'filter:slo/rate_limit_after_segment': value => $rate_limit_after_segment;
'filter:slo/rate_limit_segments_per_sec': value => $rate_limit_segments_per_sec;
'filter:slo/max_get_time': value => $max_get_time;
}
}