Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect Min replicas value in kubectl describe #16025

Merged
merged 1 commit into from Oct 23, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions pkg/kubectl/describe.go
Expand Up @@ -1271,8 +1271,12 @@ func (d *HorizontalPodAutoscalerDescriber) Describe(namespace, name string) (str
fmt.Fprintf(out, "<not available>\n")
}
}
fmt.Fprintf(out, "Min pods:\t%d\n", hpa.Spec.MinReplicas)
fmt.Fprintf(out, "Max pods:\t%d\n", hpa.Spec.MaxReplicas)
minReplicas := "<unset>"
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.
if strings.ToLower(hpa.Spec.ScaleRef.Kind) == "replicationcontroller" {
Expand Down