Skip to content

Commit

Permalink
Merge pull request #21014 from mfojtik/fix-dc-printer
Browse files Browse the repository at this point in the history
Fix printing DC replicas
  • Loading branch information
openshift-merge-robot authored Sep 18, 2018
2 parents 6cac71b + c702034 commit d3559ef
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 d3559ef

Please sign in to comment.