Commit 72bd4e8c authored by Janet Kuo's avatar Janet Kuo

Fix bug when getting new RC of a deployment

parent d0d27be9
...@@ -77,10 +77,10 @@ func GetNewRC(deployment extensions.Deployment, c client.Interface) (*api.Replic ...@@ -77,10 +77,10 @@ func GetNewRC(deployment extensions.Deployment, c client.Interface) (*api.Replic
} }
newRCTemplate := GetNewRCTemplate(deployment) newRCTemplate := GetNewRCTemplate(deployment)
for _, rc := range rcList.Items { for i := range rcList.Items {
if api.Semantic.DeepEqual(rc.Spec.Template, &newRCTemplate) { if api.Semantic.DeepEqual(rcList.Items[i].Spec.Template, &newRCTemplate) {
// This is the new RC. // This is the new RC.
return &rc, nil return &rcList.Items[i], nil
} }
} }
// new RC does not exist. // new RC does not exist.
......
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