ves-io-schema-views-tcp_loadbalancer-API-Replace

Examples of replacing tcp_loadbalancer

Usecase:

Replace "productpage" tcp_loadbalancer to now support SNI

Request using vesctl:

vesctl configuration replace tcp_loadbalancer -i tcp_loadbalancer.yaml

where file tcploadbalancer.yaml has following contents (tcploadbalancer.ReplaceRequest):

metadata:
  labels:
    ves.io/app_type: bookinfo
  name: productpage
  namespace: documentation
spec:
  advertiseOnPublicDefaultVip: {}
  domains:
  - www.bookinfo.com
  listenPort: 80
  originPoolsWeights:
  - pool:
      name: ppage-route
  withSni: true

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"productpage","namespace":"documentation","labels":{"ves.io/app_type":"bookinfo"}},"spec":{"domains":["www.bookinfo.com"],"listenPort":80,"withSni":true,"originPoolsWeights":[{"pool":{"name":"ppage-route"}}],"advertiseOnPublicDefaultVip":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build186851157_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/tcp_loadbalancers/productpage'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Tue, 24 Nov 2020 10:47:37 GMT
Vary: Accept-Encoding

{

}