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

fix #226: support the readiness and liveness for kubernetes #238

Merged
merged 4 commits into from
Jun 16, 2021

Conversation

alonlong
Copy link
Contributor

No description provided.

@alonlong alonlong added the enhancement New feature or request label Jun 12, 2021
@alonlong alonlong requested a review from petethepig June 12, 2021 08:07
@github-actions github-actions bot requested a review from Rperry2174 June 12, 2021 08:07
@codecov
Copy link

codecov bot commented Jun 12, 2021

Codecov Report

Merging #238 (b2d0258) into main (c1babda) will decrease coverage by 1.21%.
The diff coverage is 44.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #238      +/-   ##
==========================================
- Coverage   55.65%   54.44%   -1.20%     
==========================================
  Files          82       84       +2     
  Lines        3249     3470     +221     
==========================================
+ Hits         1808     1889      +81     
- Misses       1259     1390     +131     
- Partials      182      191       +9     
Impacted Files Coverage Δ
pkg/agent/selfprofile.go 0.00% <0.00%> (ø)
pkg/agent/upstream/direct/direct.go 0.00% <0.00%> (ø)
pkg/cli/cli.go 61.25% <0.00%> (ø)
pkg/cli/server_unix.go 0.00% <0.00%> (ø)
pkg/cli/usage.go 9.76% <0.00%> (-0.50%) ⬇️
pkg/server/healthz.go 0.00% <0.00%> (ø)
pkg/server/ingest.go 56.80% <0.00%> (-3.73%) ⬇️
pkg/storage/key.go 88.71% <ø> (-0.17%) ⬇️
pkg/storage/local.go 0.00% <0.00%> (ø)
pkg/util/atexit/atexit.go 0.00% <0.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 351586d...b2d0258. Read the comment docs.

Copy link
Collaborator

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

LGTM.

I guess https://github.com/pyroscope-io/helm-chart should be updated accordingly. And, perhaps, we don't need a separate deployment manifest - consider use of the helm chart instead.

@alonlong
Copy link
Contributor Author

LGTM.

I guess https://github.com/pyroscope-io/helm-chart should be updated accordingly. And, perhaps, we don't need a separate deployment manifest - consider use of the helm chart instead.

ok, i will commit a PR for helm chart

Copy link
Member

@petethepig petethepig left a comment

Choose a reason for hiding this comment

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

LGTM

@petethepig petethepig merged commit 7331758 into main Jun 16, 2021
@petethepig petethepig deleted the feature/liveness branch June 16, 2021 19:26
@beellz
Copy link

beellz commented Jun 22, 2021

There should be two different endpoints for liveness and readiness.
The endpoint readiness is available (healthz) Wouldn't work for liveness.
If the readiness fails, it would not restart the pod, but it will restart the pod when the liveness fails.
It will be better to have two different endpoints for it.

@kolesnikovae
Copy link
Collaborator

kolesnikovae commented Jun 22, 2021

There should be two different endpoints for liveness and readiness.
The endpoint readiness is available (healthz) Wouldn't work for liveness.
If the readiness fails, it would not restart the pod, but it will restart the pod when the liveness fails.
It will be better to have two different endpoints for it.

That makes a lot of sense. But right now we don't have any particular reason (apart from crash) for a health controller to restart pyroscope server. The same for readiness: the only condition we should meet before starting accepting incoming requests is that the local storage is accessible - and http server won't start otherwise. Therefore the same endpoint may serve both purposes: readiness probe and liveness probe.

Once we introduce more dependencies (e.g., connection to a remote storage backend), we should definitely split the endpoints and logic behind them.

@beellz @alonlong what do you think?

@beellz
Copy link

beellz commented Jun 23, 2021

Will work for now.
Also added readiness and liveness in helm chart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants