云容器实例 CCI-更新Volcano Job:响应示例

时间:2023-12-01 17:06:31

响应示例

状态码: 200

OK

{
  "apiVersion" : "batch.volcano.sh/v1alpha1",
  "kind" : "Job",
  "metadata" : {
    "creationTimestamp" : "2019-06-26T03:16:26Z",
    "generation" : 1,
    "labels" : {
      "app" : "patchlabel"
    },
    "name" : "openmpi-hello-2-com",
    "namespace" : "cci-namespace-42263891",
    "resourceVersion" : "7695210",
    "selfLink" : "/apis/batch.volcano.sh/v1alpha1/namespaces/cci-namespace-42263891/jobs/openmpi-hello-2-com",
    "uid" : "c84d86f0-97c0-11e9-9d09-dc9914fb58e0"
  },
  "spec" : {
    "minAvailable" : 1,
    "plugins" : {
      "env" : [ ],
      "ssh" : [ ],
      "svc" : [ ]
    },
    "queue" : "default",
    "schedulerName" : "volcano",
    "tasks" : [ {
      "name" : "mpimaster",
      "policies" : [ {
        "action" : "CompleteJob",
        "event" : "TaskCompleted"
      } ],
      "replicas" : 1,
      "template" : {
        "spec" : {
          "containers" : [ {
            "command" : [ "/bin/sh", "-c", "MPI_HOST=`cat /etc/volcano/mpiworker.host | tr \"\\n\" \",\"`;\nmkdir -p /var/run/sshd; /usr/sbin/sshd;\nmpiexec --allow-run-as-root --host ${MPI_HOST} -np 2 mpi_hello_world 003e /home/re" ],
            "image" : "*.*.*.*:20202/swr/openmpi-hello:3.28",
            "name" : "mpimaster",
            "ports" : [ {
              "containerPort" : 22,
              "name" : "mpijob-port"
            } ],
            "resources" : {
              "limits" : {
                "cpu" : "250m",
                "memory" : "1Gi"
              },
              "requests" : {
                "cpu" : "250m",
                "memory" : "1Gi"
              }
            },
            "workingDir" : "/home"
          } ],
          "imagePullSecrets" : [ {
            "name" : "imagepull-secret"
          } ],
          "restartPolicy" : "OnFailure"
        }
      }
    }, {
      "name" : "mpiworker",
      "replicas" : 2,
      "template" : {
        "spec" : {
          "containers" : [ {
            "command" : [ "/bin/sh", "-c", "mkdir -p /var/run/sshd; /usr/sbin/sshd -D;" ],
            "image" : "*.*.*.*:20202/swr/openmpi-hello:3.28",
            "name" : "mpiworker",
            "ports" : [ {
              "containerPort" : 22,
              "name" : "mpijob-port"
            } ],
            "resources" : {
              "limits" : {
                "cpu" : "250m",
                "memory" : "1Gi"
              },
              "requests" : {
                "cpu" : "250m",
                "memory" : "1Gi"
              }
            },
            "workingDir" : "/home"
          } ],
          "imagePullSecrets" : [ {
            "name" : "imagepull-secret"
          } ],
          "restartPolicy" : "OnFailure"
        }
      }
    } ]
  },
  "status" : {
    "minAvailable" : 1,
    "pending" : 3,
    "state" : {
      "phase" : "Inqueue"
    }
  }
}
support.huaweicloud.com/api-cci/patchBatchVolcanoShV1alpha1NamespacedJob.html