Skip to content

Commit

Permalink
work with helm3
Browse files Browse the repository at this point in the history
  • Loading branch information
cspargo-apptio committed Nov 28, 2019
1 parent 55c0234 commit f7b2ee9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions scripts/kr8-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set-output()
fi
if [ ! -z "$KR8_METADATA_DIR" ]
then
metaDir="$KR8_METADATA_DIR"
metaDir="$KR8_METADATA_DIR/${KR8_COMPONENT}"
else
metaDir="${KR8_BASE}/metadata//${KR8_CLUSTER}/${KR8_COMPONENT}"
fi
Expand Down Expand Up @@ -73,7 +73,13 @@ _helm-render() {
# record metadata
set-meta

helm template --name "$releasename" --namespace "$namespace" --values "$metaDir/${_chart}-values.jsonnet" "./charts/${_chart}" | kr8 yaml helmclean > "$_outfile"
if [[ $(helm version --client --short) =~ ^v3 ]]
then
local userelname="$releasename"
else
local userelname="--name $releasename"
fi
helm template $userelname --namespace "$namespace" --values "$metaDir/${_chart}-values.jsonnet" "./charts/${_chart}" | kr8 yaml helmclean > "$_outfile"
}

helm-render() {
Expand Down

0 comments on commit f7b2ee9

Please sign in to comment.