microsoft / microsoft/aspire

Expose default health endpoints for Kubernetes probes

Open
#5,420 4 comments 2 reactions 0 assignees View on GitHub
area-templates
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

Via https://github.com/dotnet/aspire/issues/4110#issuecomment-2307659159.

Kubernetes supports [three types of health probes](https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/):
- Liveness
- Readiness
- Startup

It would be useful for application developers if the Aspire service defaults configured distinct Health Check endpoints that correspond to these concepts, ready for the developer to plug in the appropriate specific health checks that are required for their application.

### Describe the solution you'd like

Provide health endpoints for each type of probe, such as:

- `/health/liveness` or `/health/live`
- `/health/readiness` or `/health/ready`
- `/health/startup`

By default these could effectively all just be a "live" health check with no specificity, and the application developer can extend each one as-appropriate for their needs. If for a simple application only one endpoint is really needed, the default would serve to inform developers of the concept and distinction between different types of health probes when deploying containers to Kubernetes.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.