nixos/cadvisor: allow passing custom arguments (#66855)

nixos/cadvisor: allow passing custom arguments
This commit is contained in:
Silvan Mosberger 2019-08-19 02:28:38 +02:00 committed by GitHub
commit 918e1e0925
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,16 @@ in {
type = types.bool; type = types.bool;
description = "Cadvisor storage driver, enable secure communication."; description = "Cadvisor storage driver, enable secure communication.";
}; };
extraOptions = mkOption {
type = types.listOf types.str;
default = [];
description = ''
Additional cadvisor options.
See <link xlink:href='https://github.com/google/cadvisor/blob/master/docs/runtime_options.md'/> for available options.
'';
};
}; };
}; };
@ -112,6 +122,7 @@ in {
-logtostderr=true \ -logtostderr=true \
-listen_ip="${cfg.listenAddress}" \ -listen_ip="${cfg.listenAddress}" \
-port="${toString cfg.port}" \ -port="${toString cfg.port}" \
${escapeShellArgs cfg.extraOptions} \
${optionalString (cfg.storageDriver != null) '' ${optionalString (cfg.storageDriver != null) ''
-storage_driver "${cfg.storageDriver}" \ -storage_driver "${cfg.storageDriver}" \
-storage_driver_user "${cfg.storageDriverHost}" \ -storage_driver_user "${cfg.storageDriverHost}" \