datastore: Don't label replica with instance manager name
It's unused
@@ -592,9 +592,6 @@ func (s *DataStore) CreateReplica(r *longhorn.Replica) (*longhorn.Replica, error
if err := tagNodeLabel(r.Spec.NodeID, r); err != nil {
return nil, err
}
- if err := tagInstanceManagerLabel(r.Status.InstanceManagerName, r); err != nil {
- return nil, err
- }
ret, err := s.lhClient.LonghornV1alpha1().Replicas(s.namespace).Create(r)
if err != nil {
@@ -628,9 +625,6 @@ func (s *DataStore) UpdateReplica(r *longhorn.Replica) (*longhorn.Replica, error
if err := tagNodeLabel(r.Spec.NodeID, r); err != nil {
return nil, err
}
- if err := tagInstanceManagerLabel(r.Status.InstanceManagerName, r); err != nil {
- return nil, err
- }
obj, err := s.lhClient.LonghornV1alpha1().Replicas(s.namespace).Update(r)
if err != nil {
@@ -1571,12 +1565,3 @@ func (s *DataStore) ListEnginesROByInstanceManager(name string) ([]*longhorn.Eng
}
return list, nil
}
-
-func (s *DataStore) ListReplicasROByInstanceManager(name string) ([]*longhorn.Replica, error) {
- selector, err := getInstanceManagerSelector(name)
- list, err := s.rLister.Replicas(s.namespace).List(selector)
- if err != nil {
- return nil, err
- }
- return list, nil
-}
