From d0027e556fc52ded153f1a012d339111d8293676 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Tue, 14 Jan 2020 19:09:39 +0000 Subject: [PATCH] fix(lib/helm): fixes for helm 3 --- lib/helm/chart2json.nix | 4 ++-- lib/helm/fetchhelm.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/helm/chart2json.nix b/lib/helm/chart2json.nix index a126e8c..0e6212e 100644 --- a/lib/helm/chart2json.nix +++ b/lib/helm/chart2json.nix @@ -22,8 +22,8 @@ in stdenvNoCC.mkDerivation { name = "${name}.json"; buildCommand = '' # template helm file and write resources to yaml - helm template --name "${name}" \ - ${optionalString (kubeVersion != null) "--kube-version ${kubeVersion}"} \ + helm template "${name}" \ + ${optionalString (kubeVersion != null) "--api-versions ${kubeVersion}"} \ ${optionalString (namespace != null) "--namespace ${namespace}"} \ ${optionalString (values != {}) "-f ${valuesJsonFile}"} \ ${chart} >resources.yaml diff --git a/lib/helm/fetchhelm.nix b/lib/helm/fetchhelm.nix index b6d9069..3fa3230 100644 --- a/lib/helm/fetchhelm.nix +++ b/lib/helm/fetchhelm.nix @@ -31,8 +31,10 @@ in { buildCommand = '' export HOME="$PWD" - helm init --client-only >/dev/null + helm init >/dev/null + echo "adding helm repo" ${if repo == null then "" else "helm repo add repository ${repo}"} + echo "fetching helm chart" helm fetch -d ./chart \ ${if untar then "--untar" else ""} \ ${if version == null then "" else "--version ${version}"} \