fix(pre-deploy): exclude hook containers from caddy and dns controllers

This commit is contained in:
Pasha Sviderski
2026-04-08 19:16:42 +10:00
parent 1930bb5766
commit e96cce88c1
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -94,13 +94,16 @@ func (c *Controller) Run(ctx context.Context) error {
}
}
// filterHealthyContainers filters out containers that are not healthy.
// filterHealthyContainers filters out unhealthy and hook containers.
// TODO: Filters out containers from this machine that are likely unavailable. The availability can be determined
// by the cluster membership state of the machine that the container is running on. Implement machine membership
// check using Corrossion Admin client.
func filterHealthyContainers(containers []store.ContainerRecord) []store.ContainerRecord {
healthy := make([]store.ContainerRecord, 0, len(containers))
for _, cr := range containers {
if cr.Container.IsHook() {
continue
}
if cr.Container.Healthy() {
healthy = append(healthy, cr)
}