Skip to content

Add optional health check endpoint#88

Merged
sktan merged 1 commit into
sktan:masterfrom
CourtAPI:feature/add-optional-healthcheck
Jun 8, 2026
Merged

Add optional health check endpoint#88
sktan merged 1 commit into
sktan:masterfrom
CourtAPI:feature/add-optional-healthcheck

Conversation

@mschout

@mschout mschout commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Hi.

We are using this container in an AWS EKS cluster, and without the ability to register a "healthcheck" probe, the ELB wont see the container as healthy. I've added an optional heathcheck here, where if HEALTHCHECK_PATH is set in the environment, then that specific path will respond with a 200 Ok response if the container appears healthy. I've just done a basic heuristic here checking if the token was refreshed recently to determine if its healthy or not.

Open to suggestions to improve this, but this made it usable behind a loadbalancer that requires a healthcheck (e.g. ELB).

Enable a non-proxied health check via the HEALTHCHECK_PATH env var.
Returns 200 when a valid CodeArtifact token is held, 503 otherwise.
@sktan

sktan commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Thanks @mschout for the PR!

@sktan sktan merged commit 1f1d2fa into sktan:master Jun 8, 2026
1 check passed
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.

2 participants