mirror of
https://github.com/honestbee/drone-kubernetes.git
synced 2025-06-17 07:26:36 +00:00
Add support for TLS Verification
This commit is contained in:
parent
0378bbb9d9
commit
cfc612a621
1 changed files with 8 additions and 2 deletions
10
update.sh
Normal file → Executable file
10
update.sh
Normal file → Executable file
|
@ -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…
Add table
Add a link
Reference in a new issue