28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'modules/pontoon/manifests/lb.pp', line 28
class pontoon::lb (
Hash[String, Wmflib::Service] $services_config,
String $public_domain,
) {
ensure_packages('hatop')
$names = pontoon::service_names($services_config)
$names_public = pontoon::service_names_public($services_config, $public_domain)
$t = $services_config.map |$service_name, $config| {
$hosts = pontoon::hosts_for_role($config['role'])
[
$service_name,
{
'names' => $names[$service_name],
'names_public' => $names_public[$service_name],
'port' => $config['port'],
'hosts' => $hosts,
'backend_use_tls' => $config['encryption'],
}
]
}
$services = Hash($t)
$ports = unique($services.map |$name, $svc| { $svc['port'] })
haproxy::site { 'pontoon_lb':
content => template('pontoon/haproxy.lb.erb'),
}
}
|