chore: replace immutable hash with container spec comparison

This commit is contained in:
Pavel Sviderski
2025-03-31 15:58:02 +10:00
parent 64f6a4f3d3
commit 0e80f2e5b2
7 changed files with 116 additions and 122 deletions
+2 -8
View File
@@ -100,10 +100,7 @@ func (s *RollingStrategy) planReplicated(
continue
}
status, err := CompareContainerToSpec(c.Container, spec)
if err != nil {
return plan, fmt.Errorf("compare container to spec: %w", err)
}
status := EvalContainerSpecChange(c.Container.ServiceSpec, spec)
containerSpecStatuses[c.Container.ID] = status
if status == ContainerUpToDate {
@@ -294,10 +291,7 @@ func reconcileGlobalContainer(
continue
}
status, err := CompareContainerToSpec(c.Container, spec)
if err != nil {
return nil, fmt.Errorf("compare container to spec: %w", err)
}
status := EvalContainerSpecChange(c.Container.ServiceSpec, spec)
if status == ContainerUpToDate {
// The container is already running with the same spec.
upToDate = true