-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add health check #2247
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
feat: Add health check #2247
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a health-check plugin and endpoint for monitoring pod status in Kubernetes. It introduces new dependencies for health checks, updates URL routing to include health endpoints, and configures health-check subsets in the settings.
- Added django-health-check and related packages in pyproject.toml.
- Updated main/urls.py to include the health endpoint.
- Configured health-check subsets in main/settings.py for startup, liveness, readiness, and full checks.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pyproject.toml | Updated dependencies with additions and removals to support health checks. |
main/urls.py | Added a new route for health check endpoints and updated static file routing. |
main/settings.py | Integrated new health-check apps and defined a detailed configuration for health check subsets. |
Comments suppressed due to low confidence (1)
pyproject.toml:27
- It appears that the Django dependency is being both added and removed. Please verify that Django is declared only once to avoid potential version conflicts.
-Django = "4.2.21"
46d9a77
to
000570c
Compare
We currently experience temporary 502s from the applications while they are doing a deployment rollout. This adds startup, readiness, and liveness checks to the pods to ensure that they are ready to serve traffic before they get incorporated into their corresponding service. This depends on upstream changes in the applications in PRS: - mitodl/mit-learn#2247 - mitodl/mitxonline#2652
8df938c
to
a906f29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceab62f
to
7c36893
Compare
In order to effectively manage Kubernetes applications we want to have startup, liveness, and readiness checks. This adds a package for exposing healthchecks that include information about the runtime status of the application.
7c36893
to
5df4129
Compare
We currently experience temporary 502s from the applications while they are doing a deployment rollout. This adds startup, readiness, and liveness checks to the pods to ensure that they are ready to serve traffic before they get incorporated into their corresponding service. This depends on upstream changes in the applications in PRS: - mitodl/mit-learn#2247 - mitodl/mitxonline#2652
We currently experience temporary 502s from the applications while they are doing a deployment rollout. This adds startup, readiness, and liveness checks to the pods to ensure that they are ready to serve traffic before they get incorporated into their corresponding service. This depends on upstream changes in the applications in PRS: - mitodl/mit-learn#2247 - mitodl/mitxonline#2652
We currently experience temporary 502s from the applications while they are doing a deployment rollout. This adds startup, readiness, and liveness checks to the pods to ensure that they are ready to serve traffic before they get incorporated into their corresponding service. This depends on upstream changes in the applications in PRS: - mitodl/mit-learn#2247 - mitodl/mitxonline#2652
What are the relevant tickets?
N/A
Description (What does it do?)
Adds a health-check plugin and endpoint for monitoring pod status in Kubernetes
Screenshots (if appropriate):
How can this be tested?
Ensure that the
/health/
,/health/liveness/
,/health/startup/
,/health/full/
, and/health/readiness/
endpoints return successfully in a running instance.Additional Context
In order to effectively manage Kubernetes applications we want to have startup, liveness, and readiness checks. This adds a package for exposing healthchecks that include information about the runtime status of the application.