From 088296c52cbe439e5dce73a9a21b94627ea5cc89 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 30 Apr 2025 19:50:48 +0300 Subject: [PATCH] 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 Autosubmit: Florian Klink --- ops/modules/o11y/agent.nix | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/ops/modules/o11y/agent.nix b/ops/modules/o11y/agent.nix index dfeba802d..cbf939828 100644 --- a/ops/modules/o11y/agent.nix +++ b/ops/modules/o11y/agent.nix @@ -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 = { }; };