云容器实例 CCI-查询所有namespace下的CronJobs:响应示例

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

响应示例

状态码: 200

OK

{
  "apiVersion" : "batch/v1beta1",
  "items" : [ {
    "metadata" : {
      "annotations" : {
        "description" : ""
      },
      "creationTimestamp" : "2022-09-06T08:56:37Z",
      "name" : "cronjob-test",
      "namespace" : "namespace-test",
      "resourceVersion" : "615089077",
      "selfLink" : "/apis/batch/v1beta1/namespaces/namespace-test/cronjobs/cronjob-test",
      "uid" : "808543b6-696f-49ef-a8c9-30ab6b66c979"
    },
    "spec" : {
      "concurrencyPolicy" : "Forbid",
      "failedJobsHistoryLimit" : 1,
      "jobTemplate" : {
        "metadata" : {
          "creationTimestamp" : null
        },
        "spec" : {
          "template" : {
            "metadata" : {
              "annotations" : {
                "cri.cci.io/container-type" : "secure-container",
                "log.stdoutcollection.kubernetes.io" : "{\\\\\"collectionContainers\\\\\": [\\\\\"container-0\\\\\"]}"
              },
              "creationTimestamp" : null
            },
            "spec" : {
              "containers" : [ {
                "image" : "redis",
                "imagePullPolicy" : "IfNotPresent",
                "lifecycle" : { },
                "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" : "Never",
              "schedulerName" : "default-scheduler",
              "securityContext" : { },
              "terminationGracePeriodSeconds" : 30
            }
          }
        }
      },
      "schedule" : "0 */1 * * *",
      "successfulJobsHistoryLimit" : 3,
      "suspend" : false
    },
    "status" : { }
  } ],
  "kind" : "CronJobList",
  "metadata" : {
    "resourceVersion" : "41656236",
    "selfLink" : ""
  }
}
support.huaweicloud.com/api-cci/listBatchV1beta1CronJobForAllNamespaces.html