Temporarily revert restart-on-node-IP-change behavior of proxy NodeManager

This commit is contained in:
Dan Winship
2025-07-19 09:45:21 -04:00
parent e2d37f3cd7
commit facbb66142
2 changed files with 14 additions and 9 deletions

View File

@@ -196,16 +196,18 @@ func (n *NodeManager) OnNodeChange(node *v1.Node) {
if !reflect.DeepEqual(n.nodeIPs, nodeIPs) {
klog.InfoS("NodeIPs changed for the node",
"node", klog.KObj(node), "newNodeIPs", nodeIPs, "oldNodeIPs", n.nodeIPs)
klog.Flush()
n.exitFunc(1)
// FIXME: exit
// klog.Flush()
// n.exitFunc(1)
}
}
// OnNodeDelete is a handler for Node deletes.
func (n *NodeManager) OnNodeDelete(node *v1.Node) {
klog.InfoS("Node is being deleted", "node", klog.KObj(node))
klog.Flush()
n.exitFunc(1)
// FIXME: exit
// klog.Flush()
// n.exitFunc(1)
}
// OnNodeSynced is called after the cache is synced and all pre-existing Nodes have been reported

View File

@@ -252,10 +252,11 @@ func TestNodeManagerOnNodeChange(t *testing.T) {
expectedExitCode: nil,
},
{
name: "node updated with different NodeIPs",
initialNodeIPs: []string{"192.168.1.1", "fd00:1:2:3::1"},
updatedNodeIPs: []string{"10.0.1.1", "fd00:3:2:1::2"},
expectedExitCode: ptr.To(1),
name: "node updated with different NodeIPs",
initialNodeIPs: []string{"192.168.1.1", "fd00:1:2:3::1"},
updatedNodeIPs: []string{"10.0.1.1", "fd00:3:2:1::2"},
// FIXME
// expectedExitCode: ptr.To(1),
},
{
name: "watchPodCIDR and node updated with same PodCIDRs",
@@ -312,7 +313,9 @@ func TestNodeManagerOnNodeDelete(t *testing.T) {
require.NoError(t, err)
nodeManager.OnNodeDelete(makeNode())
require.Equal(t, ptr.To(1), exitCode)
// FIXME
// require.Equal(t, ptr.To(1), exitCode)
require.Equal(t, (*int)(nil), exitCode)
}
func TestNodeManagerNode(t *testing.T) {