Comments (8)
Hi,
Interesting, have you checked how k8s stops containers during rolling update? I assumed it's graceful shutdown but it probably has a limit of 10 seconds and after that it just kills it.
I was planning to add two internal hooks:
- pre-update - this hook could probably do what you want. The idea is that it could call out to a remote service and inform it or wait (block) for response.
- post-update - inform remote service about update.
These hooks could either be inside the codebase (blocking and nonblocking webhooks) or custom code snippets (probably phase 2).
The problem here is that it quickly grows and soon it will require some kind of management interface & UI.
If pre/post update hooks makes sense for you, I will put up a roadmap this evening.
from keel.
Pre and post would solve this problem and others, so go with them. What would the hook notification mechanism be?
from keel.
Not sure yet, initially I thought it would be like a customizable list of endpoints to call for these webhooks and either wait, stop or proceed based on responses.
From your use-case it looks like the endpoint would be a service pointing to a deployment which will be undergoing an update. Are you running one container (replica) per deployment?
How do you think it should be configurable? Maybe each deployment could have label something like:
keel.sh/preupdateHooks=http://whatever.com/update
Problem here is that the value is limited to 63 characters.
Other option is to make these hooks configurable through the API and make a use of k8s label selectors:
selector: environment in (production, qa)
endpoints: http://yourServiceName/shouldUpdate
Disadvantages of the option 2 is that Keel would become stateful :)
from keel.
Definitely want to keep it stateless. HTTP endpoints as you suggested are the way to go. They should just be an HTTP POST with metadata about the operation.
Have to overcome the 63 chars situation though. Maybe use an annotation?
from keel.
Excellent, annotations look exactly what we need here!
from keel.
This can be implemented using the new webhooks feature.
from keel.
Hey, webhooks weren't going to work for you as they were intended as "notifications" after the fact and the actual drain feature was planned to be added through plugins. I have created another notification, webhook:
{
"name": "update deployment",
"message": "message here",
"createdAt": "2017-07-11T09:12:56.476274094+01:00",
"type": "preparing deployment update",
"level": "LevelDebug"
}
You can block now on that LevelDebug one and ignore others.
Slack :
Hope that helps!
from keel.
Closing this due to age, if advanced implementation of this required, please reopen or create a new one.
from keel.
Related Issues (20)
- need some help setting up dev environment HOT 1
- fails to pull images built for single platform with docker build and push action HOT 4
- Help with dev environment HOT 1
- Feature: Update non `images` fields HOT 2
- Assuming registry up-to-date status?
- Keel configuration to work behind a reverse proxy
- *v1beta1.CronJob: the server could not find the requested resource HOT 2
- Notifications feature proposal
- Website search bar not working
- Initial tag required? HOT 1
- High CPU usage HOT 5
- Fix documentation to add "Registry" webhook
- Bump helm chart release HOT 4
- Helm chart: Ingress not working with release name
- Add support for ntfy HOT 1
- Can keel handle multiple containers in a pod deployment? HOT 3
- Cannot use registry mirror
- keel is using deprecated api /apis/batch/v1beta1/cronjobs
- Helm chart still uses app version 0.19.1
- Timeout errors trying to use polling HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keel.