You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both implementations are functionally identical but maintained separately.
Problem:
Duplicate logic means any future change to intMax needs to be applied in two places, increasing maintenance overhead and the risk of the implementations diverging over time.
Proposed Solution:
Move intMax to a shared internal package (e.g. pkg/reconciler/autoscaling/resources) and update both reconcilers to use the shared implementation instead of their local copies.
Current Behavior:
The intMax helper function is implemented independently in both:
pkg/reconciler/autoscaling/kpa/kpa.go
pkg/reconciler/autoscaling/hpa/hpa.go
Both implementations are functionally identical but maintained separately.
Problem:
Duplicate logic means any future change to intMax needs to be applied in two places, increasing maintenance overhead and the risk of the implementations diverging over time.
Proposed Solution:
Move intMax to a shared internal package (e.g. pkg/reconciler/autoscaling/resources) and update both reconcilers to use the shared implementation instead of their local copies.