mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Fixed incorrect Min replicas value in kubectl describe
This commit is contained in:
parent
e3642f1b3f
commit
c400cbbd13
@ -1271,8 +1271,12 @@ func (d *HorizontalPodAutoscalerDescriber) Describe(namespace, name string) (str
|
|||||||
fmt.Fprintf(out, "<not available>\n")
|
fmt.Fprintf(out, "<not available>\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Fprintf(out, "Min pods:\t%d\n", hpa.Spec.MinReplicas)
|
minReplicas := "<unset>"
|
||||||
fmt.Fprintf(out, "Max pods:\t%d\n", hpa.Spec.MaxReplicas)
|
if hpa.Spec.MinReplicas != nil {
|
||||||
|
minReplicas = fmt.Sprintf("%d", *hpa.Spec.MinReplicas)
|
||||||
|
}
|
||||||
|
fmt.Fprintf(out, "Min replicas:\t%s\n", minReplicas)
|
||||||
|
fmt.Fprintf(out, "Max replicas:\t%d\n", hpa.Spec.MaxReplicas)
|
||||||
|
|
||||||
// TODO: switch to scale subresource once the required code is submitted.
|
// TODO: switch to scale subresource once the required code is submitted.
|
||||||
if strings.ToLower(hpa.Spec.ScaleRef.Kind) == "replicationcontroller" {
|
if strings.ToLower(hpa.Spec.ScaleRef.Kind) == "replicationcontroller" {
|
||||||
|
Loading…
Reference in New Issue
Block a user