mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 18:00:08 +00:00
Don't delete service endpoints when a generic error occurs
This commit is contained in:
parent
39af3cccd6
commit
b2a02140db
@ -411,6 +411,10 @@ func (e *EndpointController) syncService(key string) error {
|
|||||||
}
|
}
|
||||||
service, err := e.serviceLister.Services(namespace).Get(name)
|
service, err := e.serviceLister.Services(namespace).Get(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if !errors.IsNotFound(err) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the corresponding endpoint, as the service has been deleted.
|
// Delete the corresponding endpoint, as the service has been deleted.
|
||||||
// TODO: Please note that this will delete an endpoint when a
|
// TODO: Please note that this will delete an endpoint when a
|
||||||
// service is deleted. However, if we're down at the time when
|
// service is deleted. However, if we're down at the time when
|
||||||
|
Loading…
Reference in New Issue
Block a user