subscribe to container changes in Caddyfile controller

This commit is contained in:
Pavel Sviderski
2024-12-11 15:14:32 +10:00
parent 2134f3c1d9
commit 6b80ef9db8
5 changed files with 134 additions and 4 deletions
+1
View File
@@ -184,6 +184,7 @@ func (m *Manager) syncContainersToStore(ctx context.Context) error {
}
// Create or update the current Docker containers in the store.
// TODO: update only the changed containers to reduce unnecessary gossip traffic and not trigger other controllers.
for _, dc := range containers {
c := &api.Container{Container: dc}
if err = m.store.CreateOrUpdateContainer(ctx, c, m.machineID); err != nil {