1 { config, lib, pkgs, ... }:
6 cfg = config.services.heapster;
8 options.services.heapster = {
9 enable = mkEnableOption "Heapster monitoring";
12 description = "Heapster metric source";
13 example = "kubernetes:https://kubernetes.default";
18 description = "Heapster metic sink";
19 example = "influxdb:http://localhost:8086";
23 extraOpts = mkOption {
24 description = "Heapster extra options";
26 type = types.separatedString " ";
29 package = mkPackageOption pkgs "heapster" { };
32 config = mkIf cfg.enable {
33 systemd.services.heapster = {
34 wantedBy = ["multi-user.target"];
35 after = ["cadvisor.service" "kube-apiserver.service"];
38 ExecStart = "${cfg.package}/bin/heapster --source=${cfg.source} --sink=${cfg.sink} ${cfg.extraOpts}";
43 users.users.heapster = {
46 description = "Heapster user";
48 users.groups.heapster = {};