vshn / espejo

OpenShift and Kubernetes Object Syncer
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

Discussion: Adding watcher for each synced object #38

Closed ccremer closed 2 years ago

ccremer commented 3 years ago

Adding a watcher for each (named) object in spec.syncItems would allow Espejo to update/recreate an object immediately upon changes. On accidential deletions they would be recreated/reconciled. This would also remove the need to regularly reconcile for nothing (when no object changed)

Questions:

  1. Performance: Is it feasible to add a watcher for each object? Does it consume much memory/CPU compared to reconciling regularly? Do we generally watch the Kind of object and filter by name?
  2. Link: How do we link an update event back to a specific SyncConfig? Labels, Annotations, OwnerReference?
  3. What if multiple SyncConfigs manage the same set of Objects? Will there be a loop, how can it be broken?