fix(lib/helm): fixes for helm 3

This commit is contained in:
Jaka Hudoklin 2020-01-14 19:09:39 +00:00
parent 3c54c20836
commit d0027e556f
No known key found for this signature in database
GPG key ID: D1F18234B07BD6E2
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

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