Don't delete service endpoints when a generic error occurs

This commit is contained in:
Tim Allclair 2019-07-17 14:40:36 -07:00
parent 39af3cccd6
commit b2a02140db

View File

@ -411,6 +411,10 @@ func (e *EndpointController) syncService(key string) error {
}
service, err := e.serviceLister.Services(namespace).Get(name)
if err != nil {
if !errors.IsNotFound(err) {
return err
}
// Delete the corresponding endpoint, as the service has been deleted.
// TODO: Please note that this will delete an endpoint when a
// service is deleted. However, if we're down at the time when