ves-io-schema-views-http_loadbalancer-API-Replace

Examples of replacing http_loadbalancer

Usecase:

Replace "productpage" http_loadbalancer to now support mTLS

  • Trusted CA parameter is added to TLS config

Request using vesctl:

vesctl configuration replace http_loadbalancer -i http_loadbalancer.yaml

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

metadata:
  labels:
    ves.io/app_type: bookinfo
  name: productpage
  namespace: documentation
spec:
  advertiseOnPublicDefaultVip: {}
  defaultRoutePools:
  - pool:
      name: ppage-route
  domains:
  - www.bookinfo.com
  https:
    tlsParameters:
      tlsCertificates:
      - certificateUrl: string:///<Base64>
        privateKey:
          blindfoldSecretInfo:
            location: string:///<Base64>
      tlsConfig:
        defaultSecurity: {}
      useMtls:
        trustedCaUrl: string:///<Base64>

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"],"https":{"tlsParameters":{"tlsConfig":{"defaultSecurity":{}},"tlsCertificates":[{"certificateUrl":"string:///\u003cBase64\u003e","privateKey":{"blindfoldSecretInfo":{"location":"string:///\u003cBase64\u003e"}}}],"useMtls":{"trustedCaUrl":"string:///\u003cBase64\u003e"}}},"advertiseOnPublicDefaultVip":{},"defaultRoutePools":[{"pool":{"name":"ppage-route"}}]}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build823219857_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/http_loadbalancers/productpage'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Wed, 23 Sep 2020 09:54:14 GMT
Vary: Accept-Encoding

{

}