Merge pull request #60265 from mlmhl/storageclass_describe

Automatic merge from submit-queue (batch tested with PRs 57672, 60299, 59757, 60283, 60265). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add description of MountOptions to StorageClass describe printer

**What this PR does / why we need it**:

Print `StorageClass.MountOptions` for `kubectl describe` command.

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-02-23 21:21:50 -08:00 committed by GitHub
commit 2f09876c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3285,6 +3285,14 @@ func describeStorageClass(sc *storage.StorageClass, events *api.EventList) (stri
w.Write(LEVEL_0, "Provisioner:\t%s\n", sc.Provisioner)
w.Write(LEVEL_0, "Parameters:\t%s\n", labels.FormatLabels(sc.Parameters))
w.Write(LEVEL_0, "AllowVolumeExpansion:\t%s\n", printBoolPtr(sc.AllowVolumeExpansion))
if len(sc.MountOptions) == 0 {
w.Write(LEVEL_0, "MountOptions:\t<none>\n")
} else {
w.Write(LEVEL_0, "MountOptions:\n")
for _, option := range sc.MountOptions {
w.Write(LEVEL_1, "%s\n", option)
}
}
if sc.ReclaimPolicy != nil {
w.Write(LEVEL_0, "ReclaimPolicy:\t%s\n", *sc.ReclaimPolicy)
}