mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
nixos/services.heapster: remove with lib;
This commit is contained in:
parent
95e5f256d6
commit
baece5fb08
@ -1,35 +1,32 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.heapster;
|
||||
in {
|
||||
options.services.heapster = {
|
||||
enable = mkEnableOption "Heapster monitoring";
|
||||
enable = lib.mkEnableOption "Heapster monitoring";
|
||||
|
||||
source = mkOption {
|
||||
source = lib.mkOption {
|
||||
description = "Heapster metric source";
|
||||
example = "kubernetes:https://kubernetes.default";
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
sink = mkOption {
|
||||
sink = lib.mkOption {
|
||||
description = "Heapster metic sink";
|
||||
example = "influxdb:http://localhost:8086";
|
||||
type = types.str;
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
extraOpts = mkOption {
|
||||
extraOpts = lib.mkOption {
|
||||
description = "Heapster extra options";
|
||||
default = "";
|
||||
type = types.separatedString " ";
|
||||
type = lib.types.separatedString " ";
|
||||
};
|
||||
|
||||
package = mkPackageOption pkgs "heapster" { };
|
||||
package = lib.mkPackageOption pkgs "heapster" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.heapster = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["cadvisor.service" "kube-apiserver.service"];
|
||||
|
Loading…
Reference in New Issue
Block a user