adds execution step messages

This commit is contained in:
hashfyre 2017-12-09 17:08:57 +05:30
parent bb44230537
commit e264442450
1 changed files with 3 additions and 0 deletions

View File

@ -29,14 +29,17 @@ if [ ! -z ${PLUGIN_KUBERNETES_USER} ]; then
fi
if [ ! -z ${KUBERNETES_CLIENT_CERT} ] && [ ! -z ${KUBERNETES_CLIENT_KEY} ]; then
echo "INFO: Setting client credentials with signed-certificate and key."
echo ${KUBERNETES_CLIENT_CERT} | base64 -d > client.crt
echo ${KUBERNETES_CLIENT_KEY} | base64 -d > client.key
kubectl config set-credentials ${KUBERNETES_USER} --client-certificate=client.crt --client-key=client.key
else
echo "INFO: Setting client credentials with token."
kubectl config set-credentials ${KUBERNETES_USER} --token=${KUBERNETES_TOKEN}
fi
if [ ! -z ${KUBERNETES_CERT} ]; then
echo "INFO: Using secure connection with tls-certificate."
echo ${KUBERNETES_CERT} | base64 -d > ca.crt
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --certificate-authority=ca.crt
else