云容器实例 CCI-查询指定namespace下的所有PyTorchJob:响应消息

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

响应消息

响应参数

响应参数的详细描述请参见表170

响应示例:

{
    "apiVersion": "kubeflow.org/v1",
    "items": [
        {
            "apiVersion": "kubeflow.org/v1",
            "kind": "PyTorchJob",
            "metadata": {
                "creationTimestamp": "2019-07-24T10:29:45Z",
                "generation": 1,
                "name": "pytorch-test",
                "namespace": "kube-test",
                "resourceVersion": "72516798",
                "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/pytorchjobs/pytorch-test",
                "uid": "f4c79668-adfd-11e9-8041-340a9837e2a7"
            },
            "spec": {
                "pytorchReplicaSpecs": {
                    "Master": {
                        "replicas": 1,
                        "restartPolicy": "Never",
                        "template": {
                            "spec": {
                                "containers": [
                                    {
                                        "args": [
                                            "--backend",
                                            "gloo"
                                        ],
                                        "command": [
                                            "python",
                                            "/var/mnist.py"
                                        ],
                                        "image": "*.*.*.215:20202/gcs/pytorch-cpu:v1",
                                        "name": "pytorch",
                                        "resources": {
                                            "limits": {
                                                "cpu": 2,
                                                "memory": "4Gi"
                                            },
                                            "requests": {
                                                "cpu": 2,
                                                "memory": "4Gi"
                                            }
                                        }
                                    }
                                ],
                                "imagePullSecrets": [
                                    {
                                        "name": "imagepull-secret"
                                    }
                                ]
                            }
                        }
                    },
                    "Worker": {
                        "replicas": 1,
                        "restartPolicy": "OnFailure",
                        "template": {
                            "spec": {
                                "containers": [
                                    {
                                        "args": [
                                            "--backend",
                                            "gloo"
                                        ],
                                        "command": [
                                            "python",
                                            "/var/mnist.py"
                                        ],
                                        "image": "*.*.*.215:20202/gcs/pytorch-cpu:v1",
                                        "name": "pytorch",
                                        "resources": {
                                            "limits": {
                                                "cpu": 2,
                                                "memory": "4Gi"
                                            },
                                            "requests": {
                                                "cpu": 2,
                                                "memory": "4Gi"
                                            }
                                        }
                                    }
                                ],
                                "imagePullSecrets": [
                                    {
                                        "name": "imagepull-secret"
                                    }
                                ]
                            }
                        }
                    }
                }
            },
            "status": {
                "conditions": [
                    {
                        "lastTransitionTime": "2019-07-24T10:30:34Z",
                        "lastUpdateTime": "2019-07-24T10:30:34Z",
                        "message": "PyTorchJob pytorch-test is created.",
                        "reason": "PyTorchJobCreated",
                        "status": "True",
                        "type": "Created"
                    }
                ],
                "replicaStatuses": {
                    "Master": {}
                },
                "startTime": "2019-07-24T10:30:34Z"
            }
        }
    ],
    "kind": "PyTorchJobList",
    "metadata": {
        "continue": "",
        "resourceVersion": "72517974",
        "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/pytorchjobs"
    }
}
support.huaweicloud.com/api-cci/cci_02_3163.html