Puppet Class: thanos::query

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

Overview

Parameters:

  • http_port (Stdlib::Port::Unprivileged)
  • replica_label (String) (defaults to: 'replica')
  • sd_files (String) (defaults to: '/etc/thanos-query/stores/*.yml')


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
# File 'modules/thanos/manifests/query.pp', line 11

class thanos::query (
    Stdlib::Port::Unprivileged $http_port,
    String $replica_label = 'replica',
    String $sd_files = '/etc/thanos-query/stores/*.yml',
) {
    require_package('thanos')

    $http_address = "0.0.0.0:${http_port}"
    $service_name = 'thanos-query'
    $sd_files_path = dirname($sd_files)

    file { ['/etc/thanos-query', $sd_files_path]:
        ensure => directory,
        mode   => '0555',
        owner  => 'root',
        group  => 'root',
    }

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