cce
更新指定的PersistentVolume
更新时间:2020/12/16 GMT+08:00
功能介绍
该API用于更新PersistentVolume对象。
其中以下字段支持更新:
- metadata.labels
- metadata.generateName
- spec.accessModes
- spec.capacity
- spec.persistentVolumeReclaimPolicy
请求消息
请求参数:
“Content-Type”的详细描述请参见 PATCH请求方法操作说明。
请求示例:
Content-Type: application/json-patch+json [ { "op": "add", "path": "/spec/persistentVolumeReclaimPolicy", "value": "Retain" } ]
响应消息
响应参数:
响应参数的详细描述请参见表2.
响应示例:
{ "kind": "PersistentVolume", "apiVersion": "v1", "metadata": { "name": "pv-test-03", "namespace": "default", "selfLink": "/api/v1/namespaces/default/persistentvolumes/pv-test-03", "uid": "45eb3e76-9212-11e8-8cd0-fa163e082286", "resourceVersion": "5690537", "creationTimestamp": "2018-07-28T02:59:41Z", "labels": { "failure-domain.beta.kubernetes.io/region": "cn-north-4", "failure-domain.beta.kubernetes.io/zone": "cn-north-4a", "name": "pv-test-03" }, "annotations": { "volume.beta.kubernetes.io/storage-class": "sata", "volume.beta.kubernetes.io/storage-provisioner": "flexvolume-huawei.com/fuxivol" } }, "spec": { "capacity": { "storage": "20Gi" }, "hostPath": { "path": "/home", "type": "" }, "accessModes": [ "ReadWriteMany" ], "persistentVolumeReclaimPolicy": "Delete" }, "status": { "phase": "Available" } }
父主题: PersistentVolume
