From 637dc2877f5869f50d6b478d053962a4bb589e16 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Mon, 19 Jun 2023 00:30:07 +0200 Subject: [PATCH] Permit unsupported envoy version Signed-off-by: Magic_RB --- nixos/modules/hashicorp-envoy.nix | 8 ++++++++ nixos/systems/blowhole/klipper.nix | 1 + nixos/systems/blowhole/monitoring.nix | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/nixos/modules/hashicorp-envoy.nix b/nixos/modules/hashicorp-envoy.nix index 978244e..e4d6a9b 100644 --- a/nixos/modules/hashicorp-envoy.nix +++ b/nixos/modules/hashicorp-envoy.nix @@ -84,6 +84,13 @@ in type = types.package; default = pkgs.envoy; }; + + extraConsulArgs = mkOption { + description = mdDoc '' + ''; + type = with types; listOf str; + default = []; + }; }; }); default = {}; @@ -127,6 +134,7 @@ in startEnvoy = pkgs.writeShellScript "start_envoy_${name}.sh" '' exec ${value.consulPackage}/bin/consul connect envoy \ + ${concatStringsSep " " value.extraConsulArgs} \ ${optionalString (value.type == "normal") '' -sidecar-for ${value.service.id} \ ''} \ diff --git a/nixos/systems/blowhole/klipper.nix b/nixos/systems/blowhole/klipper.nix index ba4324f..ebeaf1e 100644 --- a/nixos/systems/blowhole/klipper.nix +++ b/nixos/systems/blowhole/klipper.nix @@ -106,6 +106,7 @@ in address = "10.64.99.6:19000"; adminBind = "127.0.0.1:19100"; hotRestart = false; + extraConsulArgs = [ "-ignore-envoy-compatibility" ]; }; users.users.klipper = { diff --git a/nixos/systems/blowhole/monitoring.nix b/nixos/systems/blowhole/monitoring.nix index 5c7b57f..5166d56 100644 --- a/nixos/systems/blowhole/monitoring.nix +++ b/nixos/systems/blowhole/monitoring.nix @@ -231,6 +231,8 @@ in adminBind = "127.0.0.1:19100"; hotRestart = false; + consulPackage = inputs'.nixpkgs-hashicorp.legacyPackages.${pkgs.stdenv.system}.consul; + extraConsulArgs = [ "-ignore-envoy-compatibility" ]; }; services.telegraf-magic = { @@ -384,6 +386,8 @@ in address = "10.64.99.2:19000"; adminBind = "127.0.0.1:19100"; hotRestart = false; + consulPackage = inputs'.nixpkgs-hashicorp.legacyPackages.${pkgs.stdenv.system}.consul; + extraConsulArgs = [ "-ignore-envoy-compatibility" ]; }; services.postgresql = { @@ -467,6 +471,8 @@ in address = "10.64.99.2:19001"; adminBind = "127.0.0.1:19101"; hotRestart = false; + consulPackage = inputs'.nixpkgs-hashicorp.legacyPackages.${pkgs.stdenv.system}.consul; + extraConsulArgs = [ "-ignore-envoy-compatibility" ]; }; services.influxdb2 = { @@ -497,6 +503,7 @@ in address = "10.64.99.2:19002"; adminBind = "127.0.0.1:19102"; hotRestart = false; + extraConsulArgs = [ "-ignore-envoy-compatibility" ]; }; services.telegraf-magic = {