refactor(ops/modules/o11y/agent): drop bearerTokenFile option
This option is not used, we can reintroduce it when needed. Change-Id: Ie0f90ea7fc84f493f0c73de29ddf200c1184cb40 Reviewed-on: https://cl.snix.dev/c/snix/+/30345 Tested-by: besadii Reviewed-by: Ryan Lahfa <masterancpp@gmail.com> Autosubmit: Florian Klink <flokli@flokli.de>
This commit is contained in:
parent
ca964623b1
commit
088296c52c
1 changed files with 1 additions and 20 deletions
|
|
@ -25,12 +25,6 @@ in
|
|||
description = "Exporter port";
|
||||
type = types.int;
|
||||
};
|
||||
options.bearerTokenFile = mkOption {
|
||||
description = "File containing a bearer token";
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
};
|
||||
|
||||
options.scrapeConfig = mkOption {
|
||||
description = "Prometheus scrape config";
|
||||
type = types.attrs;
|
||||
|
|
@ -40,20 +34,7 @@ in
|
|||
static_configs = [
|
||||
{ targets = [ "localhost:${toString config.port}" ]; }
|
||||
];
|
||||
}
|
||||
(lib.mkIf (config.bearerTokenFile != null) {
|
||||
authorization.credentials_file = "\${CREDENTIALS_DIRECTORY}/${name}-bearer-token";
|
||||
})];
|
||||
|
||||
options.secrets = mkOption {
|
||||
description = "Secrets required for scrape config";
|
||||
type = types.attrs;
|
||||
internal = true;
|
||||
default = { };
|
||||
};
|
||||
config.secrets = lib.mkIf (config.bearerTokenFile != null) {
|
||||
"${name}-bearer-token" = config.bearerTokenFile;
|
||||
};
|
||||
}];
|
||||
}));
|
||||
default = { };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue