mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
fix PrepareForUpdate bug for HPA
This commit is contained in:
parent
3bcd5b1648
commit
0109c08b9b
@ -70,7 +70,7 @@ func (autoscalerStrategy) AllowCreateOnUpdate() bool {
|
|||||||
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
|
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
|
||||||
func (autoscalerStrategy) PrepareForUpdate(obj, old runtime.Object) {
|
func (autoscalerStrategy) PrepareForUpdate(obj, old runtime.Object) {
|
||||||
newHPA := obj.(*extensions.HorizontalPodAutoscaler)
|
newHPA := obj.(*extensions.HorizontalPodAutoscaler)
|
||||||
oldHPA := obj.(*extensions.HorizontalPodAutoscaler)
|
oldHPA := old.(*extensions.HorizontalPodAutoscaler)
|
||||||
// Update is not allowed to set status
|
// Update is not allowed to set status
|
||||||
newHPA.Status = oldHPA.Status
|
newHPA.Status = oldHPA.Status
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user