ves-io-schema-discovery-API-Replace
On This Page:
Examples of replacing discovery
Usecase:
Replace discovery object to stop publishing VIP.
Request using vesctl:
vesctl configuration replace discovery -i discovery.yaml
where file discovery.yaml has following contents (discovery.ReplaceRequest):
metadata:
name: k8s-discovery
namespace: system
spec:
discoveryK8s:
accessInfo:
isolated: {}
kubeconfigUrl:
clearSecretInfo:
url: string://<base64>
publishInfo:
disable: {}
where:
virtualSite:
ref:
- kind: virtual_site
name: acmecorp-vsite
namespace: system
tenant: acmecorp
vesctl yaml response: None
Request using curl:
curl -X 'PUT' -d '{"metadata":{"name":"k8s-discovery","namespace":"system"},"spec":{"where":{"virtualSite":{"ref":[{"kind":"virtual_site","tenant":"acmecorp","namespace":"system","name":"acmecorp-vsite"}]}},"discoveryK8s":{"accessInfo":{"kubeconfigUrl":{"clearSecretInfo":{"url":"string://\u003cbase64\u003e"}},"isolated":{}},"publishInfo":{"disable":{}}}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build817539475_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/system/discoverys/k8s-discovery'
curl response:
HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Mon, 22 Feb 2021 15:43:47 GMT
Vary: Accept-Encoding
{
}