Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce informer sync interval to default 10h #162

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rather than when the Pods happen to be re-cycled.

## Compatibility

Wave uses the the golang Kubernetes client library which only supports
Wave uses the golang Kubernetes client library which only supports
the previous and the next Kubernetes version.
However, since Wave only edits Deployments, Daemonsets and StatefulSet
we can support older Kubernetes verions as long as no fields were removed
Expand Down Expand Up @@ -162,13 +162,21 @@ the Kubernetes API server. Every informer has a sync period, after which it will
refresh all resources within its cache. At this point, every item in the cache
is queued for reconciliation by the controller.

Therefore, by setting the following flag;
By default, sync will happen every 10h.
Kubernetes will inform Wave about changes in any Deployment, DaemonSet,
StatefulSet, Secret or ConfigMap in the meantime and Wave will trigger a
reconciliation right away.
If you encounter any bugs you can reduce sync period by setting the following flag:

```
--sync-period=5m // Default value of 5m (5 minutes)
--sync-period=5m // Default value of 10h (10 hours)
```

You can ensure that every resource will be reconciled at least every 5 minutes.
This will ensure that every resource will be reconciled at least every 5 minutes.
Please note that this will cause more load on your API and increase CPU load in
the Wave container.
It might also increase latency during the time of the sync.
Do not set this unless you encounter bugs (and in that case please tell us).

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (
leaderElection = flag.Bool("leader-election", false, "Should the controller use leader election")
leaderElectionID = flag.String("leader-election-id", "", "Name of the configmap used by the leader election system")
leaderElectionNamespace = flag.String("leader-election-namespace", "", "Namespace for the configmap used by the leader election system")
syncPeriod = flag.Duration("sync-period", 5*time.Minute, "Reconcile sync period")
syncPeriod = flag.Duration("sync-period", 10*time.Hour, "Reconcile sync period")
showVersion = flag.Bool("version", false, "Show version and exit")
enableWebhooks = flag.Bool("enable-webhooks", false, "Enable webhooks")
setupLog = ctrl.Log.WithName("setup")
Expand Down
Loading