Skip to content

query: Add readiness probe to query#1534

Merged
bwplotka merged 2 commits intothanos-io:masterfrom
kakkoyun:probes
Sep 18, 2019
Merged

query: Add readiness probe to query#1534
bwplotka merged 2 commits intothanos-io:masterfrom
kakkoyun:probes

Conversation

@kakkoyun
Copy link
Member

@kakkoyun kakkoyun commented Sep 17, 2019

This PR,

  • Adds /-/ready endpoint for readiness checks.

Changes

  • Adds /-/ready endpoint for readiness checks.
  • Uses prober.Prober for readiness and liveness endpoints.
  • Changes defaultHTTPListener scheduleHTTPServer to consume an existing http.Handler

Verification

  1. make test

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

curl http://0.0.0.0:10902/-/healthy
thanos query is healthy
curl http://0.0.0.0:10902/-/ready
thanos query is not ready. Reason: thanos query is initializing
curl http://0.0.0.0:10902/-/ready
thanos query is ready

@kakkoyun kakkoyun changed the title query: Use prober in query query: Add readiness probe to query Sep 17, 2019
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun
Copy link
Member Author

cc @FUSAKLA @metalmatze @bwplotka

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.

Nice, some suggestions around sprintf otherwise LGTM! 👍

@kakkoyun kakkoyun marked this pull request as ready for review September 17, 2019 17:47
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
@kakkoyun
Copy link
Member Author

@GiedriusS @bwplotka This is ready for another round. If this looks good I'll send similar PR's for other components today.

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

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.

3 participants