Skip to content

Commit

Permalink
fix PrepareForUpdate bug for HPA
Browse files Browse the repository at this point in the history
  • Loading branch information
mqliang committed May 5, 2016
1 parent 3bcd5b1 commit 0109c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/registry/horizontalpodautoscaler/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (autoscalerStrategy) AllowCreateOnUpdate() bool {
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
func (autoscalerStrategy) PrepareForUpdate(obj, old runtime.Object) {
newHPA := obj.(*extensions.HorizontalPodAutoscaler)
oldHPA := obj.(*extensions.HorizontalPodAutoscaler)
oldHPA := old.(*extensions.HorizontalPodAutoscaler)
// Update is not allowed to set status
newHPA.Status = oldHPA.Status
}
Expand Down

0 comments on commit 0109c08

Please sign in to comment.