Commit c4128497 authored by jianglingxia's avatar jianglingxia

statefulset_expansion.go delete ps define

parent 4d2a7212
......@@ -40,7 +40,6 @@ type StatefulSetNamespaceListerExpansion interface{}
// Returns an error only if no matching StatefulSets are found.
func (s *statefulSetLister) GetPodStatefulSets(pod *api.Pod) ([]*apps.StatefulSet, error) {
var selector labels.Selector
var ps *apps.StatefulSet
if len(pod.Labels) == 0 {
return nil, fmt.Errorf("no StatefulSets found for pod %v because it has no labels", pod.Name)
......@@ -52,8 +51,7 @@ func (s *statefulSetLister) GetPodStatefulSets(pod *api.Pod) ([]*apps.StatefulSe
}
var psList []*apps.StatefulSet
for i := range list {
ps = list[i]
for _, ps := range list {
if ps.Namespace != pod.Namespace {
continue
}
......
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