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 http_loadbalancer.yaml has following contents (http_loadbalancer.ReplaceRequest):

RequestJSON:

{"metadata":{"name":"productpage","namespace":"documentation","labels":{"ves.io/app_type":"bookinfo"}},"spec":{"domains":["www.bookinfo.com"],"https":{"tls_parameters":{"tls_config":{"default_security":{}},"tls_certificates":[{"certificate_url":"string:///\u003cBase64\u003e","private_key":{"blindfold_secret_info":{"location":"string:///\u003cBase64\u003e"}}}],"use_mtls":{"trusted_ca_url":"string:///\u003cBase64\u003e"}},"enable_path_normalize":{}},"advertise_on_public_default_vip":{},"default_route_pools":[{"pool":{"name":"ppage-route"}}],"disable_waf":{},"no_challenge":{},"user_id_client_ip":{},"disable_rate_limit":{},"waf_exclusion_rules":[{"any_domain":null,"methods":["ANY"],"metadata":{"name":"another-name"},"app_firewall_detection_control":{"exclude_signature_contexts":[{"signature_id":10000000}],"exclude_violation_contexts":[{"exclude_violation":"VIOL_ASM_COOKIE_MODIFIED"}],"exclude_attack_type_contexts":[{"exclude_attack_type":"ATTACK_TYPE_ABUSE_OF_FUNCTIONALITY"}]}}],"service_policies_from_namespace":{},"round_robin":{},"multi_lb_app":{}}} `

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":{"tls_parameters":{"tls_config":{"default_security":{}},"tls_certificates":[{"certificate_url":"string:///\u003cBase64\u003e","private_key":{"blindfold_secret_info":{"location":"string:///\u003cBase64\u003e"}}}],"use_mtls":{"trusted_ca_url":"string:///\u003cBase64\u003e"}},"enable_path_normalize":{}},"advertise_on_public_default_vip":{},"default_route_pools":[{"pool":{"name":"ppage-route"}}],"disable_waf":{},"no_challenge":{},"user_id_client_ip":{},"disable_rate_limit":{},"waf_exclusion_rules":[{"any_domain":null,"methods":["ANY"],"metadata":{"name":"another-name"},"app_firewall_detection_control":{"exclude_signature_contexts":[{"signature_id":10000000}],"exclude_violation_contexts":[{"exclude_violation":"VIOL_ASM_COOKIE_MODIFIED"}],"exclude_attack_type_contexts":[{"exclude_attack_type":"ATTACK_TYPE_ABUSE_OF_FUNCTIONALITY"}]}}],"service_policies_from_namespace":{},"round_robin":{},"multi_lb_app":{}}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_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: Thu, 28 Jul 2022 12:14:41 GMT
Vary: Accept-Encoding

{

}