Update Kubernetes deployments and Docker Swarm services using webhooks
MIT License
Update Kubernetes deployments and Docker Swarm services using webhooks
kubectl create serviceaccount deployd
kubectl apply -f role-binding.yaml
deployd-secret
with key token
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
docker-compose.yml
DEPLOYD_TOKEN
to a new secretUpdates of deployments/services can be triggered using, e.g.
wget --content-on-error --header "Authorization: $DEPLOYD_TOKEN" -qO- \
https://$DEPLOYD_HOST/update\?name\=$DEPLOYD_NAME\&image\=$DEPLOYD_IMAGE:$DEPLOYD_TAG
Here, $DEPLOYD_TOKEN
is the secret token that was specified in the configuration, $DEPLOYD_NAME
is the name of the service/deployment to be updated, $DEPLOYD_IMAGE
is the name of the Docker image that should be used, and $DEPLOYD_TAG
is the tag of the Docker image that should be used.