Add support for TLS Verification
This commit is contained in:
parent
0378bbb9d9
commit
cfc612a621
|
@ -6,14 +6,20 @@ fi
|
||||||
|
|
||||||
if [ ! -z ${PLUGIN_KUBERNETES_TOKEN} ]; then
|
if [ ! -z ${PLUGIN_KUBERNETES_TOKEN} ]; then
|
||||||
KUBERNETES_TOKEN=$PLUGIN_KUBERNETES_TOKEN
|
KUBERNETES_TOKEN=$PLUGIN_KUBERNETES_TOKEN
|
||||||
|
kubectl config set-credentials default --token=${KUBERNETES_TOKEN}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z ${PLUGIN_KUBERNETES_SERVER} ]; then
|
if [ ! -z ${PLUGIN_KUBERNETES_SERVER} ]; then
|
||||||
KUBERNETES_SERVER=$PLUGIN_KUBERNETES_SERVER
|
KUBERNETES_SERVER=$PLUGIN_KUBERNETES_SERVER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kubectl config set-credentials default --token=${KUBERNETES_TOKEN}
|
if [ ! -z ${PLUGIN_KUBERNETES_CERT} ]; then
|
||||||
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --insecure-skip-tls-verify=true
|
echo ${PLUGIN_KUBERNETES_CERT} > ca.crt
|
||||||
|
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --certificate-authority=ca.crt
|
||||||
|
else
|
||||||
|
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --insecure-skip-tls-verify=true
|
||||||
|
fi
|
||||||
|
|
||||||
kubectl config set-context default --cluster=default --user=default
|
kubectl config set-context default --cluster=default --user=default
|
||||||
kubectl config use-context default
|
kubectl config use-context default
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue