mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
Fix error handling in endpoint controller
Added missing returns, subsequent statements depend on key
This commit is contained in:
parent
feee4834c8
commit
5c288a77fe
@ -273,6 +273,7 @@ func (e *EndpointController) deletePod(obj interface{}) {
|
|||||||
podKey, err := keyFunc(obj)
|
podKey, err := keyFunc(obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Couldn't get key for object %+v: %v", obj, err)
|
glog.Errorf("Couldn't get key for object %+v: %v", obj, err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
glog.Infof("Pod %q was deleted but we don't have a record of its final state, so it will take up to %v before it will be removed from all endpoint records.", podKey, FullServiceResyncPeriod)
|
glog.Infof("Pod %q was deleted but we don't have a record of its final state, so it will take up to %v before it will be removed from all endpoint records.", podKey, FullServiceResyncPeriod)
|
||||||
|
|
||||||
@ -284,6 +285,7 @@ func (e *EndpointController) enqueueService(obj interface{}) {
|
|||||||
key, err := keyFunc(obj)
|
key, err := keyFunc(obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Couldn't get key for object %+v: %v", obj, err)
|
glog.Errorf("Couldn't get key for object %+v: %v", obj, err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
e.queue.Add(key)
|
e.queue.Add(key)
|
||||||
|
Loading…
Reference in New Issue
Block a user