fix: make static pods check output consistent
Sort the pod names, so the check output doesn't re-print itself on no change to the list of pods. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
c6ad0fcceb
commit
b0fdc3c8ca
@ -9,6 +9,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
"github.com/cosi-project/runtime/pkg/safe"
|
||||
@ -420,7 +421,10 @@ func K8sControlPlaneStaticPods(ctx context.Context, cl ClusterInfo) error {
|
||||
}
|
||||
|
||||
if len(expectedStaticPods) > 0 {
|
||||
return fmt.Errorf("missing static pods on node %s: %v", node.InternalIP, maps.Keys(expectedStaticPods))
|
||||
missingStaticPods := maps.Keys(expectedStaticPods)
|
||||
slices.Sort(missingStaticPods)
|
||||
|
||||
return fmt.Errorf("missing static pods on node %s: %v", node.InternalIP, missingStaticPods)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user