ves-io-schema-healthcheck-API-Replace

Examples of replacing healthcheck

Usecase:

Replace healthcheck-productpage to update timeout and interval

Request using vesctl:

vesctl configuration replace healthcheck -i healthcheck.yaml

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

metadata:
  name: healthcheck-productpage
  namespace: documentation
spec:
  healthyThreshold: 2
  httpHealthCheck:
    hostHeader: productpage.internal.bookinfo.com
    path: /healthcheck
  interval: 8
  jitter: 1
  timeout: 4
  unhealthyThreshold: 3

vesctl yaml response: None

Request using curl:

curl -X 'PUT' -d '{"metadata":{"name":"healthcheck-productpage","namespace":"documentation"},"spec":{"httpHealthCheck":{"hostHeader":"productpage.internal.bookinfo.com","path":"/healthcheck"},"timeout":4,"interval":8,"jitter":1,"unhealthyThreshold":3,"healthyThreshold":2}}' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build144460626_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/config/namespaces/documentation/healthchecks/healthcheck-productpage'

curl response:

HTTP/1.1 200 OK
Content-Length: 4
Content-Type: application/json
Date: Fri, 15 May 2020 10:52:40 GMT
Vary: Accept-Encoding

{

}