ves-io-schema-discovery-API-Get

Examples of getting discovery

Usecase:

Get k8s-discovery discovery object from system namespace

Request using vesctl:

vesctl configuration get discovery k8s-discovery --namespace system

vesctl yaml response:

object:
  metadata:
    annotations: {}
    labels: {}
    name: k8s-discovery
    namespace: system
    uid: 65428cec-c54c-4876-99ad-18d2eceb9296
  spec:
    gcSpec:
      k8s:
        kubeconfigUrl:
          clearSecretInfo:
            url: string://<base64>
      publishVip:
        publishVirtualIp: true
        subdomain: internal.bookinfo.com
      type: K8S
      where:
        virtualSite:
          ref:
          - kind: virtual_site
            name: acmecorp-vsite
            namespace: system
            tenant: acmecorp
  systemMetadata:
    creationTimestamp: "2020-05-15T10:52:35.834856689Z"
    creatorClass: examplesvc.ves.io
    finalizers: []
    namespace:
    - kind: namespace
      name: system
      tenant: acmecorp
    tenant: acmecorp
    traceInfo: 5abbc1c2ded3c512:5abbc1c2ded3c512:0:1
    uid: 65428cec-c54c-4876-99ad-18d2eceb9296
resourceVersion: "137"
status: []

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/discoverys/k8s-discovery?response_format=0'

curl response:

HTTP/1.1 200 OK
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:35 GMT
Vary: Accept-Encoding

{
  "object": {
    "metadata": {
      "name": "k8s-discovery",
      "namespace": "system",
      "uid": "65428cec-c54c-4876-99ad-18d2eceb9296",
      "labels": {
      },
      "annotations": {
      },
      "description": "",
      "disable": false
    },
    "system_metadata": {
      "uid": "65428cec-c54c-4876-99ad-18d2eceb9296",
      "creation_timestamp": "2020-05-15T10:52:35.834856689Z",
      "deletion_timestamp": null,
      "modification_timestamp": null,
      "initializers": null,
      "finalizers": [
      ],
      "tenant": "acmecorp",
      "creator_class": "examplesvc.ves.io",
      "creator_id": "",
      "creator_cookie": "",
      "trace_info": "5abbc1c2ded3c512:5abbc1c2ded3c512:0:1",
      "object_index": 0,
      "namespace": [
        {
          "kind": "namespace",
          "uid": "",
          "tenant": "acmecorp",
          "namespace": "",
          "name": "system"
        }
      ],
      "owner_view": null
    },
    "spec": {
      "gc_spec": {
        "where": {
          "virtual_site": {
            "ref": [
              {
                "kind": "virtual_site",
                "uid": "",
                "tenant": "acmecorp",
                "namespace": "system",
                "name": "acmecorp-vsite"
              }
            ],
            "network_type": "VIRTUAL_NETWORK_SITE_LOCAL"
          }
        },
        "type": "K8S",
        "publish_vip": {
          "publish_virtual_ip": true,
          "type": "DNS_DELEGATION",
          "subdomain": "internal.bookinfo.com",
          "dns_mode": "CORE_DNS",
          "namespace": ""
        },
        "k8s": {
          "kubeconfig_url": {
            "clear_secret_info": {
              "provider": "",
              "url": "string://\u003cbase64\u003e"
            },
            "secret_encoding_type": "EncodingNone"
          }
        }
      }
    }
  },
  "create_form": null,
  "replace_form": null,
  "resource_version": "137",
  "metadata": null,
  "system_metadata": null,
  "spec": null,
  "status": [
  ]
}