ves-io-schema-views-workload-API-Get

Examples of getting workload

Usecase:

Get adservice

Request using vesctl:

vesctl configuration get workload adservice --namespace documentation

vesctl yaml response:

metadata:
  annotations: {}
  labels: {}
  name: adservice
  namespace: documentation
object:
  metadata:
    annotations: {}
    labels: {}
    name: adservice
    namespace: documentation
    uid: f0cb0a15-98de-49c5-825c-a8a45b286422
  spec:
    gcSpec:
      simpleService:
        container:
          args: []
          command: []
          image:
            name: adservice:latest
            public: {}
          name: adservice
        disabled: {}
        doNotAdvertise: {}
  systemMetadata:
    creationTimestamp: "2020-10-19T09:49:35.245785300Z"
    creatorClass: examplesvc
    creatorId: examplesvc
    finalizers: []
    namespace:
    - kind: namespace
      name: documentation
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 31d21e8c1af0d2f1:31d21e8c1af0d2f1:0:1
    uid: f0cb0a15-98de-49c5-825c-a8a45b286422
resourceVersion: "866"
spec:
  simpleService:
    container:
      args: []
      command: []
      image:
        name: adservice:latest
        public: {}
      name: adservice
    disabled: {}
    doNotAdvertise: {}
status: []
systemMetadata:
  creationTimestamp: "2020-10-19T09:49:35.245785300Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: f0cb0a15-98de-49c5-825c-a8a45b286422

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build185306297_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/workloads/adservice?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Mon, 19 Oct 2020 09:49:35 GMT
Vary: Accept-Encoding

{
  "object": {
    "metadata": {
      "name": "adservice",
      "namespace": "documentation",
      "uid": "f0cb0a15-98de-49c5-825c-a8a45b286422",
      "labels": {
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "f0cb0a15-98de-49c5-825c-a8a45b286422",
      "creation_timestamp": "2020-10-19T09:49:35.245785300Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc",
      "creator_id": "examplesvc",
      "creator_cookie": "",
      "trace_info": "31d21e8c1af0d2f1:31d21e8c1af0d2f1:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "documentation"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "simple_service": {
          "container": {
            "name": "adservice",
            "image": {
              "name": "adservice:latest",
              "public": {

              },
              "pull_policy": "IMAGE_PULL_POLICY_DEFAULT"
            },
            "init_container": false,
            "flavor": "CONTAINER_FLAVOR_TYPE_TINY",
            "liveness_check": null,
            "readiness_check": null,
            "command": [
            ],
            "args": [
            ]
          },
          "configuration": null,
          "do_not_advertise": {

          },
          "disabled": {

          }
        },
        "view_internal": null,
        "virtual_k8s": null
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "866",
  "metadata": {
    "name": "adservice",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "f0cb0a15-98de-49c5-825c-a8a45b286422",
    "creation_timestamp": "2020-10-19T09:49:35.245785300Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "simple_service": {
      "container": {
        "name": "adservice",
        "image": {
          "name": "adservice:latest",
          "public": {

          },
          "pull_policy": "IMAGE_PULL_POLICY_DEFAULT"
        },
        "init_container": false,
        "flavor": "CONTAINER_FLAVOR_TYPE_TINY",
        "liveness_check": null,
        "readiness_check": null,
        "command": [
        ],
        "args": [
        ]
      },
      "configuration": null,
      "do_not_advertise": {

      },
      "disabled": {

      }
    }
  },
  "status": [
  ]
}