-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update permissions on alloy config files (#25)
* feat: update permissions on alloy config files * Alloy configuration updates (#21) * feat: switch to nixpkgs alloy package and service, some improvements to alloy ergonomics * feat: nix flake update * fix: update alloy-forwarder nix config for new module * feat: update alloy configs * feat: alloy unit tests * feat: intentionally break test * fix: remove unused import from test * fix: fix config for test run
- Loading branch information
Showing
12 changed files
with
49 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
{ ... }: { | ||
environment.etc."alloy/config.alloy" = { | ||
source = ./config.alloy; | ||
mode = "0440"; | ||
user = "root"; | ||
}; | ||
|
||
environment.etc."alloy/base.alloy" = { | ||
source = ./base.alloy; | ||
mode = "0440"; | ||
user = "root"; | ||
}; | ||
|
||
environment.etc."alloy/config.alloy".source = ./config.alloy; | ||
environment.etc."alloy/base.alloy".source = ./base.alloy; | ||
services.alloy.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ pkgs, ... }: | ||
pkgs.testers.runNixOSTest { | ||
name = "alloy-test"; | ||
|
||
nodes.machine = { ... }: { | ||
networking.firewall.allowedTCPPorts = [ 12345 ]; | ||
imports = [ ../../mixins/alloy ]; | ||
}; | ||
|
||
testScript = '' | ||
machine.wait_for_unit("alloy.service", timeout=10) | ||
machine.wait_for_open_port(12345, timeout=10) | ||
machine.succeed("curl http://localhost:12345 | grep -o \"Grafana Alloy\"") | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ pkgs, ... }: | ||
{ | ||
alloy = pkgs.callPackage ./alloy/default.nix { }; | ||
} |