https://github.com/turbolent/deployd
Update Kubernetes deployments and Docker Swarm services using webhooks
https://github.com/turbolent/deployd
deployment docker docker-swarm go golang kubernetes webhook
Last synced: 29 days ago
JSON representation
Update Kubernetes deployments and Docker Swarm services using webhooks
- Host: GitHub
- URL: https://github.com/turbolent/deployd
- Owner: turbolent
- License: mit
- Created: 2017-12-22T21:14:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-27T22:48:47.000Z (about 8 years ago)
- Last Synced: 2025-04-23T04:45:36.796Z (11 months ago)
- Topics: deployment, docker, docker-swarm, go, golang, kubernetes, webhook
- Language: Go
- Homepage:
- Size: 20.1 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deployd
Update Kubernetes deployments and Docker Swarm services using webhooks
## Kubernetes
- Create a service account:
`kubectl create serviceaccount deployd`
- Create a role binding allowing the service account to perform edits:
`kubectl apply -f role-binding.yaml`
- Create a secret named `deployd-secret` with key `token`
- Create the deployment:
`kubectl apply -f deployment.yaml`
- Create the service:
`kubectl apply -f service.yaml`
- Create an ingress
## Docker Swarm
- See `docker-compose.yml`
- Make sure to set environment variable `DEPLOYD_TOKEN` to a new secret
## Updating deployments/services
Updates of deployments/services can be triggered using, e.g.
```sh
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.