Fix conditions
This commit is contained in:
parent
d852c78c04
commit
f22ea1bb67
12
update.sh
12
update.sh
|
@ -4,16 +4,16 @@ if [ -z ${PLUGIN_NAMESPACE} ]; then
|
||||||
PLUGIN_NAMESPACE="default"
|
PLUGIN_NAMESPACE="default"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z PLUGIN_KUBERNETES_TOKEN ]; then
|
if [ ! -z ${PLUGIN_KUBERNETES_TOKEN} ]; then
|
||||||
PLUGIN_KUBERNETES_TOKEN=$KUBERNETES_TOKEN
|
KUBERNETES_TOKEN=$PLUGIN_KUBERNETES_TOKEN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z PLUGIN_KUBERNETES_SERVER ]; then
|
if [ ! -z ${PLUGIN_KUBERNETES_SERVER} ]; then
|
||||||
PLUGIN_KUBERNETES_SERVER=$KUBERNETES_SERVER
|
KUBERNETES_SERVER=$PLUGIN_KUBERNETES_SERVER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kubectl config set-credentials default --token=${PLUGIN_KUBERNETES_TOKEN}
|
kubectl config set-credentials default --token=${KUBERNETES_TOKEN}
|
||||||
kubectl config set-cluster default --server=${PLUGIN_KUBERNETES_SERVER} --insecure-skip-tls-verify=true
|
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --insecure-skip-tls-verify=true
|
||||||
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
|
||||||
kubectl -n ${PLUGIN_NAMESPACE} set image deployment/${PLUGIN_DEPLOYMENT} ${PLUGIN_CONTAINER}=${PLUGIN_REPO}:${PLUGIN_TAG}
|
kubectl -n ${PLUGIN_NAMESPACE} set image deployment/${PLUGIN_DEPLOYMENT} ${PLUGIN_CONTAINER}=${PLUGIN_REPO}:${PLUGIN_TAG}
|
||||||
|
|
Loading…
Reference in New Issue