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:

metadata:
  annotations: {}
  labels: {}
  name: k8s-discovery
  namespace: system
referringObjects: []
resourceVersion: "241"
spec:
  discoveryK8s:
    accessInfo:
      isolated: {}
      kubeconfigUrl:
        clearSecretInfo:
          url: string://<base64>
    publishInfo:
      dnsDelegation:
        subdomain: internal.bookinfo.com
  where:
    virtualSite:
      ref:
      - kind: virtual_site
        name: acmecorp-vsite
        namespace: system
        tenant: acmecorp
status: []
systemMetadata:
  creationTimestamp: "2021-04-20T13:48:29.470185460Z"
  creatorClass: examplesvc
  creatorId: examplesvc
  finalizers: []
  tenant: acmecorp
  uid: 6172d22e-d802-4d7a-9cb6-d6852360da4e

Request using curl:

curl -X 'GET' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build936321446_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: Tue, 20 Apr 2021 13:48:29 GMT
Vary: Accept-Encoding

{
  "object": null,
  "create_form": null,
  "replace_form": null,
  "resource_version": "241",
  "metadata": {
    "name": "k8s-discovery",
    "namespace": "system",
    "labels": {
    },
    "annotations": {
    },
    "description": "",
    "disable": false
  },
  "system_metadata": {
    "uid": "6172d22e-d802-4d7a-9cb6-d6852360da4e",
    "creation_timestamp": "2021-04-20T13:48:29.470185460Z",
    "deletion_timestamp": null,
    "modification_timestamp": null,
    "initializers": null,
    "finalizers": [
    ],
    "tenant": "acmecorp",
    "creator_class": "examplesvc",
    "creator_id": "examplesvc",
    "object_index": 0,
    "owner_view": null
  },
  "spec": {
    "where": {
      "virtual_site": {
        "ref": [
          {
            "kind": "virtual_site",
            "uid": "",
            "tenant": "acmecorp",
            "namespace": "system",
            "name": "acmecorp-vsite"
          }
        ],
        "network_type": "VIRTUAL_NETWORK_SITE_LOCAL"
      }
    },
    "type": "INVALID_DISCOVERY",
    "publish_vip": null,
    "discovery_k8s": {
      "access_info": {
        "kubeconfig_url": {
          "clear_secret_info": {
            "provider": "",
            "url": "string://\u003cbase64\u003e"
          },
          "blindfold_secret_info_internal": null,
          "secret_encoding_type": "EncodingNone"
        },
        "isolated": {

        }
      },
      "publish_info": {
        "dns_delegation": {
          "subdomain": "internal.bookinfo.com",
          "dns_mode": "CORE_DNS"
        }
      }
    }
  },
  "status": [
  ],
  "referring_objects": [
  ]
}