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
referringObjects: []
resourceVersion: "1151"
spec:
  simpleService:
    container:
      args: []
      command: []
      image:
        name: adservice:latest
        public: {}
      name: adservice
    disabled: {}
    doNotAdvertise: {}
status: []
systemMetadata:
  creationTimestamp: "2021-08-25T09:04:33.985294490Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 4be0a71f-a497-401e-9452-6a31541979f3

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build970361017_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-Length: 1315
Content-Type: application/json
Date: Wed, 25 Aug 2021 09:04:33 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "1151",
  "metadata": {
    "name": "adservice",
    "namespace": "documentation",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "4be0a71f-a497-401e-9452-6a31541979f3",
    "creation_timestamp": "2021-08-25T09:04:33.985294490Z",
    "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": {

      },
      "scale_to_zero": false
    }
  },
  "status": [
  ],
  "referring_objects": [
  ]
}