mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
eliminate misleading code
This commit is contained in:
committed by
mqliang
parent
608244fbb0
commit
4b79572f8e
@@ -457,7 +457,10 @@ func (nc *NodeController) tryUpdateNodeStatus(node *api.Node) (time.Duration, ap
|
|||||||
// - if 'LastProbeTime' have gone back in time its probably an error, currently we ignore it,
|
// - if 'LastProbeTime' have gone back in time its probably an error, currently we ignore it,
|
||||||
// - currently only correct Ready State transition outside of Node Controller is marking it ready by Kubelet, we don't check
|
// - currently only correct Ready State transition outside of Node Controller is marking it ready by Kubelet, we don't check
|
||||||
// if that's the case, but it does not seem necessary.
|
// if that's the case, but it does not seem necessary.
|
||||||
savedCondition := nc.getCondition(&savedNodeStatus.status, api.NodeReady)
|
var savedCondition *api.NodeCondition
|
||||||
|
if found {
|
||||||
|
savedCondition = nc.getCondition(&savedNodeStatus.status, api.NodeReady)
|
||||||
|
}
|
||||||
observedCondition := nc.getCondition(&node.Status, api.NodeReady)
|
observedCondition := nc.getCondition(&node.Status, api.NodeReady)
|
||||||
if !found {
|
if !found {
|
||||||
glog.Warningf("Missing timestamp for Node %s. Assuming now as a timestamp.", node.Name)
|
glog.Warningf("Missing timestamp for Node %s. Assuming now as a timestamp.", node.Name)
|
||||||
|
Reference in New Issue
Block a user