Skip to content

Consolidate duplicate intMax helper in KPA and HPA reconcilers #16664

Description

@jahnavigajjala-3

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/cleanupCategorizes issue or PR as related to cleaning up code, process, or technical debt.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions