dotfiles/nixos/systems/blowhole/kubernetes/templateHelmChart.nix

26 lines
442 B
Nix
Raw Normal View History

{
fetchFromGitHub,
runCommandNoCC,
kubernetes-helm,
formats,
lib,
istioctl,
}: {
helmChart,
values ? {},
name,
attrs ? {},
namespace ? "default",
}: let
inherit
(lib)
getExe'
;
in
runCommandNoCC (name + ".yaml") attrs ''
${getExe' kubernetes-helm "helm"} template \
--namespace ${namespace} \
-f ${(formats.json {}).generate "values.yaml" values} \
${name} ${helmChart} > $out
''