Skip to content

Commit

Permalink
fix printing dc replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik authored and openshift-cherrypick-robot committed Sep 18, 2018
1 parent a8ab70e commit 44fd519
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 44fd519

Please sign in to comment.