mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
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:
commit
7f7c29ad03
@ -1382,7 +1382,7 @@ func describeVolumeClaimTemplates(templates []api.PersistentVolumeClaim, w Prefi
|
|||||||
printLabelsMultilineWithIndent(w, " ", "Labels", "\t", pvc.Labels, sets.NewString())
|
printLabelsMultilineWithIndent(w, " ", "Labels", "\t", pvc.Labels, sets.NewString())
|
||||||
printLabelsMultilineWithIndent(w, " ", "Annotations", "\t", pvc.Annotations, sets.NewString())
|
printLabelsMultilineWithIndent(w, " ", "Annotations", "\t", pvc.Annotations, sets.NewString())
|
||||||
if capacity, ok := pvc.Spec.Resources.Requests[api.ResourceStorage]; ok {
|
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 {
|
} else {
|
||||||
w.Write(LEVEL_1, "Capacity:\t%s\n", "<default>")
|
w.Write(LEVEL_1, "Capacity:\t%s\n", "<default>")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user