Puppet Class: thanos::bucket_web

Defined in:
modules/thanos/manifests/bucket_web.pp

Overview

Parameters:

  • objstore_account (Hash[String, String])
  • objstore_password (String)
  • http_port (Stdlib::Port::Unprivileged) (defaults to: 15902)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'modules/thanos/manifests/bucket_web.pp', line 8

class thanos::bucket_web (
    Hash[String, String] $objstore_account,
    String $objstore_password,
    Stdlib::Port::Unprivileged $http_port = 15902,
) {
    ensure_packages(['thanos'])

    $http_address = "0.0.0.0:${http_port}"
    $service_name = 'thanos-bucket-web'
    $objstore_config_file = '/etc/thanos-bucket-web/objstore.yaml'

    file { '/etc/thanos-bucket-web':
        ensure => directory,
        mode   => '0555',
        owner  => 'root',
        group  => 'root',
    }

    file { $objstore_config_file:
        ensure    => present,
        mode      => '0440',
        owner     => 'thanos',
        group     => 'root',
        show_diff => false,
        content   => template('thanos/objstore.yaml.erb'),
    }

    systemd::service { $service_name:
        ensure         => present,
        restart        => true,
        content        => systemd_template('thanos-bucket-web'),
        service_params => {
            enable     => true,
            hasrestart => true,
        },
    }
}