Skip to content

Commit

Permalink
Merge pull request #21017 from openshift-cherrypick-robot/cherry-pick…
Browse files Browse the repository at this point in the history
…-21014-to-release-3.11

[release-3.11] Fix printing DC replicas
  • Loading branch information
derekwaynecarr authored Sep 19, 2018
2 parents 4b0752f + 44fd519 commit 467b468
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/oc/lib/describe/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ func printDeploymentRc(deployment *corev1.ReplicationController, kubeClient kube
timeAt := strings.ToLower(formatRelativeTime(deployment.CreationTimestamp.Time))
fmt.Fprintf(w, "\tCreated:\t%s ago\n", timeAt)
fmt.Fprintf(w, "\tStatus:\t%s\n", appsutil.DeploymentStatusFor(deployment))
fmt.Fprintf(w, "\tReplicas:\t%d current / %d desired\n", deployment.Status.Replicas, deployment.Spec.Replicas)
if deployment.Spec.Replicas != nil {
fmt.Fprintf(w, "\tReplicas:\t%d current / %d desired\n", deployment.Status.Replicas, *deployment.Spec.Replicas)
}

if verbose {
fmt.Fprintf(w, "\tSelector:\t%s\n", formatLabels(deployment.Spec.Selector))
Expand Down

0 comments on commit 467b468

Please sign in to comment.