Commit 1beed0f4 authored by Ayush Pateria's avatar Ayush Pateria

Remove unused code and modify tests to include set based selector

parent 4f84a1cb
......@@ -63,7 +63,6 @@ func ControllerRevisionName(prefix string, hash uint32) string {
func NewControllerRevision(parent metav1.Object,
parentKind schema.GroupVersionKind,
podLabels map[string]string,
selector labels.Selector,
data runtime.RawExtension,
revision int64,
collisionCount *int32) (*apps.ControllerRevision, error) {
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment