Skip to content

Commit

Permalink
Merge pull request #18331 from janetkuo/fix-deployment-getnewrc
Browse files Browse the repository at this point in the history
Fix bug when getting new RC of a deployment
  • Loading branch information
nikhiljindal committed Dec 10, 2015
2 parents b9aa710 + 72bd4e8 commit 9d1f07d
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 @@ -77,10 +77,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

1 comment on commit 9d1f07d

@k8s-teamcity-mesosphere

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OSS :: Kubernetes Mesos :: 4 - Smoke Tests Build 9025 outcome was SUCCESS
Summary: Tests passed: 1, ignored: 205 Build time: 00:03:53

Please sign in to comment.