Skip to content

Add optional health check endpoint#88

Open
mschout wants to merge 1 commit into
sktan:masterfrom
CourtAPI:feature/add-optional-healthcheck
Open

Add optional health check endpoint#88
mschout wants to merge 1 commit into
sktan:masterfrom
CourtAPI:feature/add-optional-healthcheck

Conversation

@mschout
Copy link
Copy Markdown

@mschout mschout commented Jun 5, 2026

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.
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.

1 participant