Merge pull request #49952 from FengyunPan/repeat-check

Automatic merge from submit-queue (batch tested with PRs 49885, 49751, 49441, 49952, 49945)

There is no need to split service key repeatedly

**Release note**:
```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-08-07 12:56:15 -07:00 committed by GitHub
commit 8de72d21e8
1 changed files with 0 additions and 6 deletions

View File

@ -328,12 +328,6 @@ func (e *EndpointController) syncService(key string) error {
// service is deleted. However, if we're down at the time when // service is deleted. However, if we're down at the time when
// the service is deleted, we will miss that deletion, so this // the service is deleted, we will miss that deletion, so this
// doesn't completely solve the problem. See #6877. // doesn't completely solve the problem. See #6877.
namespace, name, err := cache.SplitMetaNamespaceKey(key)
if err != nil {
utilruntime.HandleError(fmt.Errorf("Need to delete endpoint with key %q, but couldn't understand the key: %v", key, err))
// Don't retry, as the key isn't going to magically become understandable.
return nil
}
err = e.client.Core().Endpoints(namespace).Delete(name, nil) err = e.client.Core().Endpoints(namespace).Delete(name, nil)
if err != nil && !errors.IsNotFound(err) { if err != nil && !errors.IsNotFound(err) {
return err return err