Skip to content

feat(operator): make the reconcile resync interval configurable - #32

Merged
binhnguyenduc merged 1 commit into
masterfrom
feat/configurable-resync-interval
Jul 24, 2026
Merged

feat(operator): make the reconcile resync interval configurable#32
binhnguyenduc merged 1 commit into
masterfrom
feat/configurable-resync-interval

Conversation

@binhnguyenduc

Copy link
Copy Markdown

What

Adds a --resync-period operator flag (default 30s) controlling how often every RedisFailover is periodically re-reconciled, in addition to reacting to change events.

Why

The controller's ResyncInterval was a hardcoded 30s constant. Operators had no way to trade periodic-healing latency against API load — a fixed 30s can be too chatty on large fleets or too slow when faster drift correction is wanted.

Changes

  • config.go: new Config.ResyncPeriod time.Duration.
  • factory.go: use cfg.ResyncPeriod, falling back to the 30s default when unset (safe for direct New()/test callers).
  • cmd/utils/flags.go: --resync-period duration flag wired into the config.
  • README: documented under a new subsection + TOC entry.

Compatibility

Default is unchanged (30s), so existing deployments behave identically.

Upstream references

Test

go build ./..., go test ./..., gofmt clean.

The controller's ResyncInterval was hardcoded to 30s, so operators could
not tune how often every RedisFailover is periodically re-reconciled.
Add a --resync-period duration flag (default 30s) plumbed through
Config.ResyncPeriod; the factory falls back to the 30s default when it
is left unset.

Refs upstream spotahome#661.
@binhnguyenduc
binhnguyenduc merged commit 6a5dae8 into master Jul 24, 2026
7 checks passed
@binhnguyenduc
binhnguyenduc deleted the feat/configurable-resync-interval branch July 24, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant