Extract non-storage operations from service etcd

This commit is contained in:
Wojciech Tyczynski
2015-08-06 10:46:45 +02:00
parent e034712456
commit d11ab96446
5 changed files with 28 additions and 84 deletions

View File

@@ -144,6 +144,13 @@ func (rs *REST) Delete(ctx api.Context, id string) (runtime.Object, error) {
return nil, err
}
// TODO: can leave dangling endpoints, and potentially return incorrect
// endpoints if a new service is created with the same name
err = rs.endpoints.DeleteEndpoints(ctx, id)
if err != nil && !errors.IsNotFound(err) {
return nil, err
}
if api.IsServiceIPSet(service) {
rs.serviceIPs.Release(net.ParseIP(service.Spec.ClusterIP))
}