云容器实例 CCI-查询指定namespace下的StatefulSets:响应示例

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

响应示例

状态码: 200

OK

{
  "apiVersion" : "apps/v1",
  "items" : [ {
    "metadata" : {
      "creationTimestamp" : "2018-09-04T07:13:00Z",
      "generation" : 1,
      "labels" : {
        "app" : "statefulset-test"
      },
      "name" : "statefulset-test",
      "namespace" : "namespace-test",
      "resourceVersion" : "5209881",
      "selfLink" : "/apis/apps/v1/namespaces/namespace-test/statefulsets/statefulset-test",
      "uid" : "f4a35f35-b011-11e8-b6ef-f898ef6c78b4"
    },
    "spec" : {
      "podManagementPolicy" : "OrderedReady",
      "replicas" : 3,
      "revisionHistoryLimit" : 10,
      "selector" : {
        "matchLabels" : {
          "app" : "statefulset-test"
        }
      },
      "serviceName" : "",
      "template" : {
        "metadata" : {
          "annotations" : {
            "cri.cci.io/container-type" : "secure-container"
          },
          "creationTimestamp" : null,
          "labels" : {
            "app" : "statefulset-test"
          }
        },
        "spec" : {
          "containers" : [ {
            "image" : "redis",
            "imagePullPolicy" : "IfNotPresent",
            "name" : "container-0",
            "resources" : {
              "limits" : {
                "cpu" : "500m",
                "memory" : "1Gi"
              },
              "requests" : {
                "cpu" : "500m",
                "memory" : "1Gi"
              }
            },
            "terminationMessagePath" : "/dev/termination-log",
            "terminationMessagePolicy" : "File"
          } ],
          "dnsPolicy" : "ClusterFirst",
          "imagePullSecrets" : [ {
            "name" : "imagepull-secret"
          } ],
          "restartPolicy" : "Always",
          "schedulerName" : "default-scheduler",
          "securityContext" : { }
        }
      },
      "updateStrategy" : {
        "type" : "OnDelete"
      }
    },
    "status" : {
      "collisionCount" : 0,
      "currentReplicas" : 3,
      "currentRevision" : "statefulset-test-f986b645b",
      "observedGeneration" : 1,
      "readyReplicas" : 2,
      "replicas" : 3,
      "updateRevision" : "statefulset-test-f986b645b"
    }
  } ],
  "kind" : "StatefulSetList",
  "metadata" : {
    "resourceVersion" : "5215730",
    "selfLink" : "/apis/apps/v1/namespaces/namespace-test/statefulsets"
  }
}
support.huaweicloud.com/api-cci/listAppsV1NamespacedStatefulSet.html