Puppet Class: profile::thanos::query_frontend

Defined in:
modules/profile/manifests/thanos/query_frontend.pp

Overview

Parameters:

  • prometheus_nodes (Array) (defaults to: lookup('prometheus_nodes'))
  • memcached_hosts (Array[Stdlib::Host]) (defaults to: lookup('profile::thanos::query_frontend::memcached_hosts'))


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'modules/profile/manifests/thanos/query_frontend.pp', line 6

class profile::thanos::query_frontend (
    Array $prometheus_nodes = lookup('prometheus_nodes'),
    Array[Stdlib::Host] $memcached_hosts = lookup('profile::thanos::query_frontend::memcached_hosts'),
) {
    $http_port = 16902

    class { 'thanos::query_frontend':
        http_port       => $http_port,
        memcached_hosts => $memcached_hosts,
        memcached_port  => 11211,
    }

    # Allow access only to query_frontend to scrape metrics
    $prometheus_nodes_ferm = join($prometheus_nodes, ' ')
    ferm::service { 'thanos_query_frontend_prometheus':
        proto  => 'tcp',
        port   => $http_port,
        srange => "(@resolve((${prometheus_nodes_ferm})) @resolve((${prometheus_nodes_ferm}), AAAA))",
    }
}