云容器实例 CCI-替换PersistentVolumeClaims:请求示例

时间:2024-11-06 15:35:51

请求示例

更新PersistentVolumeClaims的metadata.labels

{
  "apiVersion" : "v1",
  "kind" : "PersistentVolumeClaim",
  "metadata" : {
    "annotations" : {
      "everest.io/disk-volume-type" : "SATA",
      "pv.kubernetes.io/bind-completed" : "yes",
      "pv.kubernetes.io/bound-by-controller" : "yes",
      "volume.beta.kubernetes.io/storage-provisioner" : "everest-csi-provisioner"
    },
    "creationTimestamp" : "2023-06-25T02:59:26Z",
    "finalizers" : [ "kubernetes.io/pvc-protection" ],
    "labels" : {
      "failure-domain.beta.kubernetes.io/region" : "cn-north-7",
      "failure-domain.beta.kubernetes.io/zone" : "cn-north-7a"
    },
    "name" : "pvc-test",
    "namespace" : "test-namespace",
    "resourceVersion" : "343613181",
    "selfLink" : "/api/v1/namespaces/test-namespace/persistentvolumeclaims/pvc-test",
    "uid" : "bb99f33d-a5da-46b4-90a4-b0c6b3eedabf"
  },
  "spec" : {
    "accessModes" : [ "ReadWriteMany" ],
    "resources" : {
      "requests" : {
        "storage" : "10Gi"
      }
    },
    "storageClassName" : "sata",
    "volumeMode" : "Filesystem",
    "volumeName" : "pvc-bb99f33d-a5da-46b4-90a4-b0c6b3eedabf"
  }
}
support.huaweicloud.com/api-cci/replaceCoreV1NamespacedPersistentVolumeClaim.html