Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule: Add liveness and readiness probe #1538

Merged
merged 5 commits into from
Sep 19, 2019
Merged

Conversation

kakkoyun
Copy link
Member

Signed-off-by: Kemal Akkoyun kakkoyun@gmail.com

This PR,

  • Adds /-/healthy endpoint for liveness checks.
  • Adds /-/ready endpoint for readiness checks.

Changes

  • Adds /-/healthy endpoint for liveness checks.
  • Adds /-/ready endpoint for readiness checks.
  • Uses prober.Prober for readiness and liveness endpoints.

Verification

  1. make test

  2. Started thanos rule and made a request to related endpoints.

curl http://0.0.0.0:10902/-/healthy
thanos rule is healthy%
curl http://0.0.0.0:10902/-/ready
thanos rule is not ready. Reason: thanos rule is initializing
curl http://0.0.0.0:10902/-/ready
thanos rule is ready%
  1. Started thanos rule and visited http://localhost:10902/rules to check UI.

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun
Copy link
Member Author

cc @FUSAKLA

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor nit only.

cmd/thanos/rule.go Outdated Show resolved Hide resolved
cmd/thanos/rule.go Outdated Show resolved Hide resolved
Co-Authored-By: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@FUSAKLA FUSAKLA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks! 👍

@FUSAKLA
Copy link
Member

FUSAKLA commented Sep 18, 2019

One tiny thing, please add those also to the https://github.com/thanos-io/thanos/blob/master/tutorials/kubernetes-demo/manifests/thanos-ruler.yaml example so it stays up to date

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@bwplotka bwplotka merged commit 7229cdd into thanos-io:master Sep 19, 2019
GiedriusS pushed a commit that referenced this pull request Oct 28, 2019
* Add prober to rule

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Add changelog entry

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update README

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Apply suggestions from code review

Co-Authored-By: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>

* Update rule tutorial

Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants