Minior cleanup in pkg/controller/node/ipam/sync/sync.go

This commit is contained in:
Jing Ai 2017-10-03 16:55:36 -07:00
parent 31697a27f9
commit 51172a587b

View File

@ -56,7 +56,7 @@ type kubeAPI interface {
UpdateNodePodCIDR(ctx context.Context, node *v1.Node, cidrRange *net.IPNet) error
// UpdateNodeNetworkUnavailable updates the network unavailable status for the node.
UpdateNodeNetworkUnavailable(nodeName string, unavailable bool) error
// EmitNodeEvent emits an event for the given node.
// EmitNodeWarningEvent emits an event for the given node.
EmitNodeWarningEvent(nodeName, reason, fmt string, args ...interface{})
}
@ -173,7 +173,7 @@ func (sync *NodeSync) Delete(node *v1.Node) {
// syncOp is the interface for generic sync operation.
type syncOp interface {
// run the requested sync operation.
// Run the requested sync operation.
run(sync *NodeSync) error
}
@ -263,11 +263,6 @@ func (op *updateOp) updateNodeFromAlias(ctx context.Context, sync *NodeSync, nod
glog.V(2).Infof("Node %q PodCIDR set to %v", node.Name, aliasRange)
if err := sync.kubeAPI.UpdateNodeNetworkUnavailable(node.Name, false); err != nil {
glog.Errorf("Error setting route status for node %q: %v", node.Name, err)
return err
}
if err := sync.kubeAPI.UpdateNodeNetworkUnavailable(node.Name, false); err != nil {
glog.Errorf("Could not update node NetworkUnavailable status to false: %v", err)
return err