Remove unused code and modify tests to include set based selector

This commit is contained in:
Ayush Pateria
2018-02-20 03:23:51 +05:30
parent 4f84a1cb7e
commit 1beed0f4c6
3 changed files with 63 additions and 153 deletions

View File

@@ -312,15 +312,10 @@ func newRevision(set *apps.StatefulSet, revision int64, collisionCount *int32) (
if err != nil {
return nil, err
}
selector, err := metav1.LabelSelectorAsSelector(set.Spec.Selector)
if err != nil {
return nil, err
}
podLabels := set.Spec.Template.Labels
cr, err := history.NewControllerRevision(set,
controllerKind,
podLabels,
selector,
runtime.RawExtension{Raw: patch},
revision,
collisionCount)