mirror of https://github.com/k3s-io/k3s
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
commit
8de72d21e8
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue