Skip to content

Commit

Permalink
[clusteragent/autoscaling] Pass correct value of internal spec to hash (
Browse files Browse the repository at this point in the history
#29374)

(cherry picked from commit 6853e7e)
  • Loading branch information
jennchenn authored and github-actions[bot] committed Sep 16, 2024
1 parent 692dae1 commit 90c4151
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/clusteragent/autoscaling/workload/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ func (c *Controller) syncPodAutoscaler(ctx context.Context, key, ns, name string
// and compare it with the one in the PodAutoscaler. If they differ, we should update the PodAutoscaler
// otherwise store the Generation
if podAutoscalerInternal.Generation() != podAutoscaler.Generation {
localHash, err := autoscaling.ObjectHash(podAutoscalerInternal.Spec)
localHash, err := autoscaling.ObjectHash(podAutoscalerInternal.Spec())
if err != nil {
c.store.Unlock(key)
return autoscaling.Requeue, fmt.Errorf("Failed to compute Spec hash for PodAutoscaler: %s/%s, err: %v", ns, name, err)
}

remoteHash, err := autoscaling.ObjectHash(podAutoscaler.Spec)
remoteHash, err := autoscaling.ObjectHash(&podAutoscaler.Spec)
if err != nil {
c.store.Unlock(key)
return autoscaling.Requeue, fmt.Errorf("Failed to compute Spec hash for PodAutoscaler: %s/%s, err: %v", ns, name, err)
Expand Down

0 comments on commit 90c4151

Please sign in to comment.