diff --git a/README.md b/README.md index 6de5ea1..a83ec46 100644 --- a/README.md +++ b/README.md @@ -83,10 +83,10 @@ It supports to setup kubernetes liveness/readiness probe really easily like this import com.github.everpeace.healthchecks._ import com.github.everpeace.healthchecks.k8s._ - // by default, listening localhost:9999 + // by default, listening localhost:8086 // and probe paths are - // GET /k8s/liveness_probe - // GET /k8s/readiness_probe + // GET /live + // GET /ready val probeBinding = bindAndHandleProbes( readinessProbe(healthCheck(name = "readiness_check")(healthy)), livenessProbe(asyncHealthCheck(name = "liveness_check")(Future(healthy))) @@ -99,14 +99,14 @@ Then you can set kubernetes liveness/readiness probe in the kubernetes manifest ... livenessProbe: httpGet: - path: /k8s/liveness_probe - port: 9999 + path: /live + port: 8086 initialDelaySeconds: 3 periodSeconds: 3 readinessProbe: httpGet: - path: /k8s/readiness_probe - port: 9999 + path: /ready + port: 8086 initialDelaySeconds: 3 periodSeconds: 3 ... diff --git a/k8s-probes/src/main/resources/reference.conf b/k8s-probes/src/main/resources/reference.conf index fd8aa26..d568b81 100644 --- a/k8s-probes/src/main/resources/reference.conf +++ b/k8s-probes/src/main/resources/reference.conf @@ -1,8 +1,8 @@ k8s_probe { host = "localhost" - port = "9999" + port = "8086" path { - liveness = "/k8s/liveness_probe" - readiness = "/k8s/readiness_probe" + liveness = "/live" + readiness = "/ready" } } diff --git a/k8s-probes/src/test/scala/com/github/everpeace/healthchecks/k8s/K8sProbesTest.scala b/k8s-probes/src/test/scala/com/github/everpeace/healthchecks/k8s/K8sProbesTest.scala index 43a07c8..9d06e1e 100644 --- a/k8s-probes/src/test/scala/com/github/everpeace/healthchecks/k8s/K8sProbesTest.scala +++ b/k8s-probes/src/test/scala/com/github/everpeace/healthchecks/k8s/K8sProbesTest.scala @@ -48,9 +48,9 @@ class K8sProbesTest extends FreeSpec with Matchers { ) def requestToLivenessProbe = - Http().singleRequest(HttpRequest(uri = "http://localhost:9999/k8s/liveness_probe")) + Http().singleRequest(HttpRequest(uri = "http://localhost:8086/live")) def requestToReadinessProbe = - Http().singleRequest(HttpRequest(uri = "http://localhost:9999/k8s/readiness_probe")) + Http().singleRequest(HttpRequest(uri = "http://localhost:8086/ready")) val livenessResponse = Await.result(requestToLivenessProbe, 10 seconds) val redinessResponse = Await.result(requestToReadinessProbe, 10 seconds)