Skip to content

Commit

Permalink
Merge pull request kubernetes#18405 from janetkuo/automated-cherry-pi…
Browse files Browse the repository at this point in the history
…ck-of-#18331-upstream-release-1.1

Automated cherry pick of kubernetes#18331 upstream release 1.1
  • Loading branch information
j3ffml committed Dec 11, 2015
2 parents 68094b1 + aab5b0c commit d9374fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/util/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func GetNewRC(deployment extensions.Deployment, c client.Interface) (*api.Replic
}
newRCTemplate := GetNewRCTemplate(deployment)

for _, rc := range rcList.Items {
if api.Semantic.DeepEqual(rc.Spec.Template, newRCTemplate) {
for i := range rcList.Items {
if api.Semantic.DeepEqual(rcList.Items[i].Spec.Template, newRCTemplate) {
// This is the new RC.
return &rc, nil
return &rcList.Items[i], nil
}
}
// new RC does not exist.
Expand Down

0 comments on commit d9374fc

Please sign in to comment.