Skip to content

Commit

Permalink
Merge pull request #11956 from knobunc/cp/11940-f5-service-delete
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Nov 17, 2016
2 parents 7767123 + 7684960 commit b4e0954
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/router/f5/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,21 @@ func (p *F5Plugin) HandleEndpoints(eventType watch.EventType,
return err
}
}
case watch.Deleted:
poolname := poolName(endpoints.Namespace, endpoints.Name)
// presumably, the endpoints are a nil subnet now, reset it anyway
endpoints.Subsets = nil
err := p.updatePool(poolname, endpoints)
if err != nil {
return err
}

glog.V(4).Infof("Deleting pool %s", poolname)

err = p.deletePool(poolname)
if err != nil {
return err
}
}

glog.V(4).Infof("Done processing Endpoints for Name: %v.", endpoints.Name)
Expand Down

0 comments on commit b4e0954

Please sign in to comment.