Puppet Class: profile::thanos::store::main

Defined in:
modules/profile/manifests/thanos/store/main.pp

Overview

Parameters:

  • objstore_account (Hash[String, String]) (defaults to: lookup('profile::thanos::objstore_account'))
  • objstore_password (String) (defaults to: lookup('profile::thanos::objstore_password'))
  • query_hosts (Array) (defaults to: lookup('profile::thanos::frontends'))
  • object_store_cutoff_days (Optional[Integer]) (defaults to: lookup('profile::thanos::object_store_cutoff_days', { 'default_value' => undef }))
  • min_time (Optional[String]) (defaults to: lookup('profile::thanos::store::min_time', { 'default_value' => undef }))
  • memcached_hosts (Array[Stdlib::Host]) (defaults to: lookup('profile::thanos::store::memcached_hosts'))
  • limits_request_series (Integer) (defaults to: lookup('thanos_limits_request_series', { 'default_value' => 0 }))


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
# File 'modules/profile/manifests/thanos/store/main.pp', line 15

class profile::thanos::store::main (
    Hash[String, String] $objstore_account = lookup('profile::thanos::objstore_account'),
    String $objstore_password = lookup('profile::thanos::objstore_password'),
    Array $query_hosts = lookup('profile::thanos::frontends'),
    Optional[Integer] $object_store_cutoff_days = lookup('profile::thanos::object_store_cutoff_days', { 'default_value' => undef }),
    Optional[String] $min_time = lookup('profile::thanos::store::min_time', { 'default_value' => undef }),
    Array[Stdlib::Host] $memcached_hosts = lookup('profile::thanos::store::memcached_hosts'),
    Integer $limits_request_series = lookup('thanos_limits_request_series', { 'default_value' => 0 }), # lint:ignore:wmf_styleguide
) {
    $http_port = 11902
    $grpc_port = 11901

    thanos::store { 'main':
        objstore_account      => $objstore_account,
        objstore_password     => $objstore_password,
        http_port             => $http_port,
        grpc_port             => $grpc_port,
        # Thanos Store accepts input in the form of an interval (e.g., '15d' represents 15 days).
        # With respect to Thanos Rule, we also need to add a minus sign here
        # The cutoff parameter is expressed in days as an Integer, and here we adjust the format to the correct string.
        max_time              => sprintf('-%dd', $object_store_cutoff_days),
        min_time              => $min_time,
        consistency_delay     => '30m',
        tracing_enabled       => true,
        memcached_hosts       => $memcached_hosts,
        memcached_port        => 11211,
        limits_request_series => $limits_request_series,
    }
}