mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-30 03:56:12 +01:00
26 lines
661 B
Nix
26 lines
661 B
Nix
|
{
|
||
|
fetchFromGitHub,
|
||
|
runCommandNoCC,
|
||
|
kubernetes-helm,
|
||
|
formats,
|
||
|
lib,
|
||
|
istioctl,
|
||
|
}: let
|
||
|
inherit
|
||
|
(lib)
|
||
|
getExe'
|
||
|
;
|
||
|
istioSrc =
|
||
|
istioctl.src
|
||
|
+ "/manifests/charts";
|
||
|
|
||
|
extractHelmChart = helmChart: values: name: attrs:
|
||
|
runCommandNoCC (name + ".yaml") attrs ''
|
||
|
(
|
||
|
${getExe' kubernetes-helm "helm"} template --namespace kube-system -f ${(formats.json {}).generate "values.yaml" values} ${helmChart}/base
|
||
|
${getExe' kubernetes-helm "helm"} template --namespace kube-system -f ${(formats.json {}).generate "values.yaml" values} ${helmChart}/istiod
|
||
|
) > $out
|
||
|
'';
|
||
|
in
|
||
|
extractHelmChart istioSrc {} "istio" {}
|