Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus-alertmanager module: implement meshing #46571

Closed
wants to merge 3 commits into from

Conversation

globin
Copy link
Member

@globin globin commented Sep 12, 2018

Motivation for this change

Allow meshing in the prometheus alertmanager module.

This has been used in production for quite some time and we just missed upstreaming it.
Therefore, and due to it being a rather small change, I propose backporting to 18.09 (cc @vcunat, @samueldr)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • N/A macOS
    • N/A other Linux distributions
  • N/A Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • N/A Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • N/A Tested execution of all binary files (usually in ./result/bin/)
  • N/A Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

users.extraGroups."${cfg.group}" = { };

systemd.tmpfiles.rules = [
"d ${cfg.stateDir} 0770 ${cfg.user} ${cfg.group} -"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this chowned recursively?

Copy link
Member

@Mic92 Mic92 Sep 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeDirectory provided by systemd might be better.

description = ''
User name under which Alertmanager shall be run.
'';
};

group = mkOption {
type = types.str;
default = "nogroup";
default = "alertmanager";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it does not matter, DynamicUser might be an option.

@globin
Copy link
Member Author

globin commented Nov 14, 2018

Behaviour changed in current alertmanager version, closing for now.

@globin globin closed this Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants