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}"} \