• Kubernetes Submit Queue's avatar
    Merge pull request #52168 from… · fbf687c6
    Kubernetes Submit Queue authored
    Merge pull request #52168 from mattjmcnaughton/mattjmcnaughton/49256-clear-status-message-when-zero-desired-pods
    
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..
    
    Fix incorrect status msg in podautoscaler
    
    **Which issue this PR fixes**
    
    Fix #49256
    
    **What this PR does / why we need it**:
    
    When `ScalingLimited = true` for the `hpa`, there is an accompanying
    status message, describing why scaling is limited. Previously if the desired
    replica count was 0, and spec.minReplicas > 0, the status message
    indicated "the desired replica count was less than the min replica
    count". This was particularly confusing when `spec.MinReplicas = 1`. If
    there was no `spec.minReplicas`, then the status message indicated "the
    desired replica count was zero" which is more informative.
    
    Update the calculation of status message so that if the desired replica
    count is 0, we always display the clearer "the desired replica count was
    zero" status message, even if spec.minReplicas > 0.
    Signed-off-by: 's avatarmattjmcnaughton <mattjmcnaughton@gmail.com>
    
    ```release-note
    NONE
    ```
    fbf687c6
Name
Last commit
Last update
..
bootstrap Loading commit data...
certificates Loading commit data...
cloud Loading commit data...
cronjob Loading commit data...
daemon Loading commit data...
deployment Loading commit data...
disruption Loading commit data...
endpoint Loading commit data...
garbagecollector Loading commit data...
history Loading commit data...
job Loading commit data...
namespace Loading commit data...
node Loading commit data...
podautoscaler Loading commit data...
podgc Loading commit data...
replicaset Loading commit data...
replication Loading commit data...
resourcequota Loading commit data...
route Loading commit data...
service Loading commit data...
serviceaccount Loading commit data...
statefulset Loading commit data...
testutil Loading commit data...
ttl Loading commit data...
volume Loading commit data...
.import-restrictions Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
client_builder.go Loading commit data...
controller_ref_manager.go Loading commit data...
controller_ref_manager_test.go Loading commit data...
controller_utils.go Loading commit data...
controller_utils_test.go Loading commit data...
doc.go Loading commit data...
lookup_cache.go Loading commit data...