Rolling updater availability enhancements

Enhance the rolling updater to support maintaining minimum pod
availability for the duration of the update process.
This commit is contained in:
Dan Mace
2015-07-28 14:43:48 -04:00
parent cb2252b57f
commit da5e4d7bd5
6 changed files with 1289 additions and 928 deletions

View File

@@ -44,8 +44,13 @@ func (c *FakePods) List(label labels.Selector, field fields.Selector) (*api.PodL
if obj == nil {
return nil, err
}
return obj.(*api.PodList), err
list := &api.PodList{}
for _, pod := range obj.(*api.PodList).Items {
if label.Matches(labels.Set(pod.Labels)) {
list.Items = append(list.Items, pod)
}
}
return list, err
}
func (c *FakePods) Create(pod *api.Pod) (*api.Pod, error) {