ReplicaSetSpec.Template shouldn't be a pointer.

PodTemplateSpec should be consistent for all the types in extensions/v1beta1.

See PR #19510.
This commit is contained in:
Madhusudan.C.S
2016-03-09 13:11:13 -08:00
parent 108f722657
commit db48dcf583
22 changed files with 75 additions and 92 deletions

View File

@@ -86,7 +86,7 @@ func GetOldReplicaSetsFromLists(deployment *extensions.Deployment, c clientset.I
return nil, nil, fmt.Errorf("invalid label selector: %v", err)
}
// Filter out replica set that has the same pod template spec as the deployment - that is the new replica set.
if api.Semantic.DeepEqual(rs.Spec.Template, &newRSTemplate) {
if api.Semantic.DeepEqual(rs.Spec.Template, newRSTemplate) {
continue
}
allOldRSs[rs.ObjectMeta.Name] = rs
@@ -131,7 +131,7 @@ func GetNewReplicaSetFromList(deployment *extensions.Deployment, c clientset.Int
newRSTemplate := GetNewReplicaSetTemplate(deployment)
for i := range rsList {
if api.Semantic.DeepEqual(rsList[i].Spec.Template, &newRSTemplate) {
if api.Semantic.DeepEqual(rsList[i].Spec.Template, newRSTemplate) {
// This is the new ReplicaSet.
return &rsList[i], nil
}