Comments (4)
Its two different ways of doing things. Both methods depend on k8s to automaticly "roll pod" - when an annotation on it is updated.
When helm updates it (generating new checksums of configs) - it can ONLY look at config it can see - where it runs. It cannot get them (without a hack) from the cluster.
This means - if you have a service that depends on config maps for other services - a helm approach won't help you - as those configmaps won't be local to your service.
This controller parses the actual deployment and generates hash'es of configmaps and secrets used - to automaticly notice if any of them change.
As I understand it though - it can be a quite heavy job, as it polls all the time - there is no event to trigger when it runs ?
from wave.
As I understand it though - it can be a quite heavy job, as it polls all the time - there is no event to trigger when it runs ?
Wave is actually event driven! We use what is known as an Informer
as a source of events that cause Wave to reconcile.
When Wave starts, it lists and then watches for all deployments, daemonsets, statefulsets, configmaps and secrets. These are all then stored in a cache. The watch part of this causes Kubernetes to stream events related to these types to the controller, allowing it to keep its cache in sync (though it does periodically do a full resync). Every one of these streamed events is filtered by Wave and causes Deployments/Daemonsets/Statefulsets to be queued for reconcile.
What this means is that any time a configmap or secret is modified, all of the Deployments/StatefulSets/DaemonSets that mount them are reconciled by Wave. There is a lot of filtering in place to make sure we perform the reconciliation as little as possible.
This is the same way all controllers in mainline Kubernetes work, so having Wave installed should be no heavier than any of the other Kubernetes controllers (including the 35 in controller-manager)
from wave.
@JoelSpeed Thank you for your swift response.. I must admit that it worries me when I see this: https://github.com/pusher/wave/blame/master/README.md#L118 - and from what you say - it should not be necessary to set such a sync interval? (since it reacts on events - and so will notice "almost immediately" - if a configmap or secret is updated)
from wave.
We have potentially been a bit overly cautious on our recommendation of every 5 minutes, controller-runtime on which Wave is based set the value to 10 hours by default.
The reason these syncs are necessary is because events are not guaranteed. Like with any distributed system, there is no guarantee that every packet reaches the destination and as such, some events could be missed. Imagine missing an event that updates a configmap, and then having nothing else disturbed (so no more events, so no reconcile), and then only resycning when the controller restarts, you'd be a bit disappointed by the project right? There's no way for us to guarantee we receive every event without constant polling which would put far higher load on the API, so this is the best we have.
That said, I wouldn't worry too much about the load that Wave puts on the API. It performs 5 list calls when it resyncs. Kubernetes is designed to respond to thousands of requests per second, 5 should not cause it much issue 😉
In comparison to most controllers Wave is actually comparatively lightweight. Having just checked our production clusters, we sit at about 2m
CPU and 40Mi
memory constantly (in terms of Kubernetes resource values).
Having checked the audit logs for our production clusters, Wave is currently averaging 2.67 calls to the API per minute over the last 24 hours and excluding leader election.
from wave.
Related Issues (20)
- use rbac.authorization.k8s.io/v1 HOT 7
- Wave is not starting the stateful set pods HOT 2
- helm installation instructions don't work HOT 9
- Does wave support Kubernetes Jobs HOT 2
- Helm chart installation fails on Kubernetes v1.23.6+k3s1 HOT 1
- changes to projected volumes not detected properly HOT 3
- v1beta1 resource not available change to v1 to make crds work on helm install HOT 9
- non-rolling update, i.e. kill pod before starting new HOT 2
- Can't deploy helm chart on k8s version >v1.22 HOT 5
- [helm] Cannot install chart in kubernetes 1.25 HOT 2
- [Question] Any security issues to consider? HOT 1
- Wave Removes StartupProbes HOT 4
- New and motivated project member HOT 8
- Support for releases / tags HOT 2
- Getting rid of ownerReferences and finalizers
- Website is outdated HOT 1
- Upgrade to 4.1 fails HOT 4
- Children Tracking Issue: Required and Non-Required Keys are mixed up
- Children Tracking Issue: Multiple references to the same child overwrite each other
- Children Tracking Issue: Wave does not verify if all keys exist in required children
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 wave.