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"; name = "${name}.json";
buildCommand = '' buildCommand = ''
# template helm file and write resources to yaml # template helm file and write resources to yaml
helm template --name "${name}" \ helm template "${name}" \
${optionalString (kubeVersion != null) "--kube-version ${kubeVersion}"} \ ${optionalString (kubeVersion != null) "--api-versions ${kubeVersion}"} \
${optionalString (namespace != null) "--namespace ${namespace}"} \ ${optionalString (namespace != null) "--namespace ${namespace}"} \
${optionalString (values != {}) "-f ${valuesJsonFile}"} \ ${optionalString (values != {}) "-f ${valuesJsonFile}"} \
${chart} >resources.yaml ${chart} >resources.yaml

View file

@ -31,8 +31,10 @@ in {
buildCommand = '' buildCommand = ''
export HOME="$PWD" 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}"} ${if repo == null then "" else "helm repo add repository ${repo}"}
echo "fetching helm chart"
helm fetch -d ./chart \ helm fetch -d ./chart \
${if untar then "--untar" else ""} \ ${if untar then "--untar" else ""} \
${if version == null then "" else "--version ${version}"} \ ${if version == null then "" else "--version ${version}"} \