Fix cleaning up taints

This commit is contained in:
Aleksandra Malinowska 2018-05-11 12:00:39 +02:00
parent 31f82b19c6
commit ff77f2cc7d
1 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,8 @@ func NewStaticAutoscaler(opts AutoscalingOptions, predicateChecker *simulator.Pr
func (a *StaticAutoscaler) CleanUp() {
// CA can die at any time. Removing taints that might have been left from the previous run.
if readyNodes, err := a.ReadyNodeLister().List(); err != nil {
glog.Errorf("Failed to list ready nodes, not cleaning up taints: %v", err)
} else {
cleanToBeDeleted(readyNodes, a.AutoscalingContext.ClientSet, a.Recorder)
}
}