kubectl: update deployment describer to correctly show total replicas

This commit is contained in:
Michail Kargakis 2017-01-25 11:30:11 +01:00
parent 373e7ef0c0
commit e7a2b3e43a

View File

@ -2312,7 +2312,7 @@ func (dd *DeploymentDescriber) Describe(namespace, name string, describerSetting
w.Write(LEVEL_0, "CreationTimestamp:\t%s\n", d.CreationTimestamp.Time.Format(time.RFC1123Z)) w.Write(LEVEL_0, "CreationTimestamp:\t%s\n", d.CreationTimestamp.Time.Format(time.RFC1123Z))
printLabelsMultiline(w, "Labels", d.Labels) printLabelsMultiline(w, "Labels", d.Labels)
w.Write(LEVEL_0, "Selector:\t%s\n", selector) w.Write(LEVEL_0, "Selector:\t%s\n", selector)
w.Write(LEVEL_0, "Replicas:\t%d updated | %d total | %d available | %d unavailable\n", d.Status.UpdatedReplicas, *d.Spec.Replicas, d.Status.AvailableReplicas, d.Status.UnavailableReplicas) w.Write(LEVEL_0, "Replicas:\t%d desired | %d updated | %d total | %d available | %d unavailable\n", *(d.Spec.Replicas), d.Status.UpdatedReplicas, d.Status.Replicas, d.Status.AvailableReplicas, d.Status.UnavailableReplicas)
w.Write(LEVEL_0, "StrategyType:\t%s\n", d.Spec.Strategy.Type) w.Write(LEVEL_0, "StrategyType:\t%s\n", d.Spec.Strategy.Type)
w.Write(LEVEL_0, "MinReadySeconds:\t%d\n", d.Spec.MinReadySeconds) w.Write(LEVEL_0, "MinReadySeconds:\t%d\n", d.Spec.MinReadySeconds)
if d.Spec.Strategy.RollingUpdate != nil { if d.Spec.Strategy.RollingUpdate != nil {