Created
September 25, 2019 10:28
-
-
Save tun0/845e796008ac6ca6229af910682c6983 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CHART=$1 | |
HR=$2 | |
usage() { | |
echo "$(basename $0) </path/to/chart/> </path/to/helmrelease>" | |
} | |
if test ! -d "${CHART}" | |
then | |
echo "Error! \"${CHART}\" is not an existing directory!" | |
echo | |
usage | |
exit 1; | |
fi | |
if test ! -f "${HR}" | |
then | |
echo "Error! \"${HR}\" is not an existing file!" | |
echo | |
usage | |
exit 1; | |
fi | |
NAME=$(yq r ${HR} metadata.name) | |
VALUES=$(yq r ${HR} spec.values) | |
echo "${VALUES}" | helm install --debug --dry-run --name ${NAME} --values=- ${CHART} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment