-
Notifications
You must be signed in to change notification settings - Fork 289
Add health check endpoints for Kubernetes liveness and readiness probes #216
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
Conversation
Co-authored-by: karpikpl <[email protected]>
Co-authored-by: karpikpl <[email protected]>
Co-authored-by: karpikpl <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot resolve conflicts |
Co-authored-by: karpikpl <[email protected]>
Conflicts resolved successfully in commit 6f3ffee. The merge conflicts in Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR adds dedicated health check endpoints to resolve the issue of using
/as a liveness/readiness endpoint, which was triggering GitHub API calls and causing flaky response times in Kubernetes deployments.Changes Made
New Health Check Endpoints
/api/health- General health status endpoint/api/ready- Readiness probe endpoint (application ready to serve traffic)/api/live- Liveness probe endpoint (application is alive and responsive)Key Features
Middleware Updates
Modified
server/middleware/github.tsto skip authentication for health endpoints while maintaining authentication requirements for all other API endpoints.Example Response
{ "status": "alive", "timestamp": "2025-07-01T22:12:35.849Z", "version": "2.0.4", "pid": 1234, "uptime": 16.176, "memory": { "used": 9, "total": 11 } }Kubernetes Configuration
Documentation
Updated both
README.mdandDEPLOYMENT.mdwith Kubernetes health check configuration examples and usage instructions.Testing
This solution eliminates the flaky behavior caused by GitHub API calls during health checks while maintaining the security and functionality of the existing application.
Fixes #212.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
api.fontshare.comnode (vitest)(dns block)node /home/REDACTED/work/copilot-metrics-viewer/copilot-metrics-viewer/node_modules/.bin/nuxt build(dns block)api.fontsource.orgnode (vitest)(dns block)node /home/REDACTED/work/copilot-metrics-viewer/copilot-metrics-viewer/node_modules/.bin/nuxt build(dns block)fonts.bunny.netnode (vitest)(dns block)node /home/REDACTED/work/copilot-metrics-viewer/copilot-metrics-viewer/node_modules/.bin/nuxt build(dns block)fonts.google.comnode (vitest)(dns block)node /home/REDACTED/work/copilot-metrics-viewer/copilot-metrics-viewer/node_modules/.bin/nuxt build(dns block)fonts.googleapis.comnode (vitest 1)(dns block)node (vitest 2)(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.