operator-sdk
operator-sdk copied to clipboard
SyncPeriod for controllers
Hey I want to set a reconcile on one of my controller at regular intervals of time. Going through the issues I found out that it can be done via syncPeriod manager option. But when I refer to this doc
https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/manager?utm_source=godoc#Options
I don't see any SyncPeriod
attribute. So is it deprecated ? if yes then what is the way to acheive this ?
Hi @IshaanDesai45 - thanks for filing this issue!
I think the manager.Options
type has been updated and there is not a direct SyncPeriod
field anymore. Instead it should be set via the manager.Options.Cache.SyncPeriod
field.
See: https://github.com/kubernetes-sigs/controller-runtime/blob/v0.17.2/pkg/cache/cache.go#L136
I hope this helps!