Last active
January 29, 2020 21:31
-
-
Save dennybaa/1042010dfcd941f96635f3080561c575 to your computer and use it in GitHub Desktop.
Helm enable TLS #helm #k8s #tls
This file contains 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
## Enable --tls substitution for helm tls-enabled commands | |
# | |
helm() { | |
_context=$(kubectl config current-context) | |
if [ -d "${HELM_HOME:-$HOME/.helm}/tls/$_context" ]; then | |
export HELM_TLS_CA_CERT="${HELM_HOME:-$HOME/.helm}/tls/$_context/ca.cert.pem" | |
export HELM_TLS_CERT="${HELM_HOME:-$HOME/.helm}/tls/$_context/cert.pem" | |
export HELM_TLS_KEY="${HELM_HOME:-$HOME/.helm}/tls/$_context/key.pem" | |
export HELM_TLS_ENABLE="true" | |
fi | |
command helm "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment