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:
Florian Klink 2025-04-30 19:50:48 +03:00 committed by clbot
parent ca964623b1
commit 088296c52c

View file

@ -25,12 +25,6 @@ in
description = "Exporter port"; description = "Exporter port";
type = types.int; type = types.int;
}; };
options.bearerTokenFile = mkOption {
description = "File containing a bearer token";
type = types.nullOr types.path;
default = null;
};
options.scrapeConfig = mkOption { options.scrapeConfig = mkOption {
description = "Prometheus scrape config"; description = "Prometheus scrape config";
type = types.attrs; type = types.attrs;
@ -40,20 +34,7 @@ in
static_configs = [ static_configs = [
{ targets = [ "localhost:${toString config.port}" ]; } { 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 = { }; default = { };
}; };