mirror of
https://github.com/honestbee/drone-kubernetes.git
synced 2025-05-23 19:33:18 +00:00
Add namespace option
This commit is contained in:
parent
4490e740d3
commit
8d2432c6e8
2 changed files with 6 additions and 3 deletions
|
@ -1,9 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z ${PLUGIN_NAMESPACE} ]; then
|
||||
PLUGIN_NAMESPACE="default"
|
||||
fi
|
||||
|
||||
kubectl config set-credentials default --token=${KUBERNETES_TOKEN}
|
||||
kubectl config set-cluster default --server=${KUBERNETES_SERVER} --insecure-skip-tls-verify=true
|
||||
kubectl config set-context default --cluster=default --user=default
|
||||
kubectl config use-context default
|
||||
kubectl set image deployment/${PLUGIN_DEPLOYMENT} ${PLUGIN_NAME}=${PLUGIN_REPO}:${PLUGIN_TAG}
|
||||
|
||||
#TODO : Identify a good way to identify IMAGE_NAME and PLUGIN_DEPLOY_IMAGE
|
||||
kubectl -n ${PLUGIN_NAMESPACE} set image deployment/${PLUGIN_DEPLOYMENT} ${PLUGIN_NAME}=${PLUGIN_REPO}:${PLUGIN_TAG}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue