Fix a bug that StatefulSet applies the revision incorrectly
This commit is contained in:
@@ -344,11 +344,12 @@ func ApplyRevision(set *apps.StatefulSet, revision *apps.ControllerRevision) (*a
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(patched, clone)
|
||||
restoredSet := &apps.StatefulSet{}
|
||||
err = json.Unmarshal(patched, restoredSet)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return clone, nil
|
||||
return restoredSet, nil
|
||||
}
|
||||
|
||||
// nextRevision finds the next valid revision number based on revisions. If the length of revisions
|
||||
|
Reference in New Issue
Block a user