Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
address PR feedback
  • Loading branch information
dprotaso committed Nov 3, 2025
commit 5abda165192c3f9c6545e5d30406cb96b1edb3e6
14 changes: 7 additions & 7 deletions pkg/reconciler/revision/reconcile_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (c *Reconciler) reconcilePA(ctx context.Context, rev *v1.Revision) error {
// We no longer require immutability, so need to reconcile PA each time.
tmpl := resources.MakePA(rev, deployment)
logger.Debugf("Desired PASpec: %#v", tmpl.Spec)
if !equality.Semantic.DeepEqual(tmpl.Spec, pa.Spec) || !annotationsNeedReconcilingForKPA(pa.Annotations, tmpl.Annotations) {
if !equality.Semantic.DeepEqual(tmpl.Spec, pa.Spec) || annotationsNeedReconcilingForKPA(pa.Annotations, tmpl.Annotations) {
want := pa.DeepCopy()
want.Spec = tmpl.Spec

Expand Down Expand Up @@ -236,7 +236,7 @@ func syncAnnotationsForKPA(dst, src map[string]string) {
}
}

// copy source annotations over while preserving existing ones
// copy src annotationst to dst
maps.Copy(dst, src)
}

Expand All @@ -245,7 +245,7 @@ func syncAnnotationsForKPA(dst, src map[string]string) {
//
// It will detect deletions for kpa annotations
func annotationsNeedReconcilingForKPA(dst, src map[string]string) bool {
// Check for extra autoscaling annotations that don't exist src
// Check for extra autoscaling annotations that don't exist in src
for k := range dst {
if !strings.HasPrefix(k, autoscaling.GroupName) {
continue
Expand All @@ -258,7 +258,7 @@ func annotationsNeedReconcilingForKPA(dst, src map[string]string) bool {
if _, ok := src[k]; !ok {
// Scaling annotation is in dst but not src
// return false to trigger reconciliation
return false
return true
}
}

Expand All @@ -270,14 +270,14 @@ func annotationsNeedReconcilingForKPA(dst, src map[string]string) bool {
continue
}

return false
return true
}

if got != want {
return false
return true
}
}
return true
return false
}

func hasDeploymentTimedOut(deployment *appsv1.Deployment) bool {
Expand Down
Loading