ves-io-schema-views-origin_pool-API-Replace

Examples of replacing origin_pool

Usecase:

Replace "productpage" origin_pool to now support TLS

Request using vesctl:

vesctl configuration replace origin_pool -i origin_pool.yaml

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

metadata:
  labels:
    ves.io/app_type: bookinfo
  name: productpage
  namespace: documentation
spec:
  originServers:
  - publicName:
      dnsName: volterra.io
  port: 80
  useTls:
    tlsConfig:
      defaultSecurity: null

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"productpage","namespace":"documentation","labels":{"ves.io/app_type":"bookinfo"}},"spec":{"originServers":[{"publicName":{"dnsName":"volterra.io"}}],"useTls":{"tlsConfig":{"defaultSecurity":null}},"port":80}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build013258245_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/origin_pools/productpage'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 16 Sep 2020 10:51:04 GMT
Vary: Accept-Encoding

{

}