1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

thanos: 0.5.0 -> 0.6.0

This commit is contained in:
Bas van Dijk 2019-07-28 12:07:52 +02:00
parent 6a59dc35f6
commit 0a59be7136
2 changed files with 38 additions and 22 deletions

View file

@ -113,23 +113,39 @@ let
'';
};
gcloudtrace = {
tracing = cfg: {
tracing.config-file = {
toArgs = _opt: path: optionToArgs "tracing.config-file" path;
option = mkOption {
type = with types; nullOr str;
default = if cfg.tracing.config == null then null
else toString (toYAML "tracing.yaml" cfg.tracing.config);
defaultText = ''
if config.services.thanos.<cmd>.tracing.config == null then null
else toString (toYAML "tracing.yaml" config.services.thanos.<cmd>.tracing.config);
'';
description = ''
Path to YAML file that contains tracing configuration.
'';
};
};
gcloudtrace.project = mkParam types.str ''
GCP project to send Google Cloud Trace tracings to.
tracing.config =
{
toArgs = _opt: _attrs: [];
option = nullOpt types.attrs ''
Tracing configuration.
If <literal>null</literal>, tracing will be disabled.
'';
When not <literal>null</literal> the attribute set gets converted to
a YAML file and stored in the Nix store. The option
<option>tracing.config-file</option> will default to its path.
gcloudtrace.sample-factor = mkParamDef types.int 1 ''
How often we send traces <literal>1/&lt;sample-factor&gt;</literal>.
If <literal>0</literal> no trace will be sent periodically, unless
forced by baggage item.
'';
If <option>tracing.config-file</option> is set this option has no effect.
'';
};
};
common = params.log // params.gcloudtrace // {
common = cfg: params.log // params.tracing cfg // {
http-address = mkParamDef types.str "0.0.0.0:10902" ''
Listen <literal>host:port</literal> for HTTP endpoints.
@ -190,7 +206,7 @@ let
};
};
sidecar = params.common // params.objstore cfg.sidecar // {
sidecar = params.common cfg.sidecar // params.objstore cfg.sidecar // {
prometheus.url = mkParamDef types.str "http://localhost:9090" ''
URL at which to reach Prometheus's API.
@ -224,7 +240,7 @@ let
};
store = params.common // params.objstore cfg.store // {
store = params.common cfg.store // params.objstore cfg.store // {
stateDir = mkStateDirParam "data-dir" "thanos-store" ''
Data directory relative to <literal>/var/lib</literal>
@ -262,7 +278,7 @@ let
'';
};
query = params.common // {
query = params.common cfg.query // {
grpc-client-tls-secure = mkFlagParam ''
Use TLS when talking to the gRPC server
@ -385,7 +401,7 @@ let
'';
};
rule = params.common // params.objstore cfg.rule // {
rule = params.common cfg.rule // params.objstore cfg.rule // {
labels = mkAttrsParam "label" ''
Labels to be applied to all generated metrics.
@ -497,7 +513,7 @@ let
'';
};
compact = params.log // params.gcloudtrace // params.objstore cfg.compact // {
compact = params.log // params.tracing cfg.compact // params.objstore cfg.compact // {
http-address = mkParamDef types.str "0.0.0.0:10902" ''
Listen <literal>host:port</literal> for HTTP endpoints.
@ -553,7 +569,7 @@ let
'';
};
downsample = params.log // params.gcloudtrace // params.objstore cfg.downsample // {
downsample = params.log // params.tracing cfg.downsample // params.objstore cfg.downsample // {
stateDir = mkStateDirParam "data-dir" "thanos-downsample" ''
Data directory relative to <literal>/var/lib</literal>
@ -562,7 +578,7 @@ let
};
receive = params.common // params.objstore cfg.receive // {
receive = params.common cfg.receive // params.objstore cfg.receive // {
remote-write.address = mkParamDef types.str "0.0.0.0:19291" ''
Address to listen on for remote write requests.

View file

@ -1,16 +1,16 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "thanos";
version = "0.5.0";
version = "0.6.0";
src = fetchFromGitHub {
rev = "v${version}";
owner = "improbable-eng";
repo = "thanos";
sha256 = "0my0653mkb14m93s4x3nyf8khyljkvi5sq049lir8yqzqn7p1654";
sha256 = "0vcp7m8fsk4jyk49jh9wmbvkx5k03xw10f4lbsxfmwib1y5pz2x0";
};
modSha256 = "1236cg00h8077fmvyddwjsnw85r69ac18b2chcpgzd85xdcaxavk";
modSha256 = "139b66jdryqv4s1hjbn9fzkyzn1160wr4z6a6wmmvm3f6p6wgjxp";
subPackages = "cmd/thanos";