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
  • Loading branch information
jennchenn authored and grantseltzer committed Oct 4, 2024
1 parent 8de0cf9 commit 2fac7dd
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 2fac7dd

Please sign in to comment.