Merge pull request #47573 from k82cn/k8s_47571

Automatic merge from submit-queue (batch tested with PRs 45268, 47573, 47632, 47818)

Fixed statefulset PVC's capacity in kubectl description.

**What this PR does / why we need it**:
We should use object instead of pointer for `String()`.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47571 

**Release note**:

```release-note-none
Fix VolumeClaims/capacity in "kubectl describe statefulsets" output.
```
This commit is contained in:
Kubernetes Submit Queue 2017-06-20 18:18:56 -07:00 committed by GitHub
commit 7f7c29ad03

View File

@ -1382,7 +1382,7 @@ func describeVolumeClaimTemplates(templates []api.PersistentVolumeClaim, w Prefi
printLabelsMultilineWithIndent(w, " ", "Labels", "\t", pvc.Labels, sets.NewString())
printLabelsMultilineWithIndent(w, " ", "Annotations", "\t", pvc.Annotations, sets.NewString())
if capacity, ok := pvc.Spec.Resources.Requests[api.ResourceStorage]; ok {
w.Write(LEVEL_1, "Capacity:\t%s\n", capacity)
w.Write(LEVEL_1, "Capacity:\t%s\n", capacity.String())
} else {
w.Write(LEVEL_1, "Capacity:\t%s\n", "<default>")
}