Skip to content

add a health-check server #19

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

Merged
merged 2 commits into from
Oct 10, 2024
Merged

add a health-check server #19

merged 2 commits into from
Oct 10, 2024

Conversation

metachris
Copy link
Contributor

Often, load balancers or kubernetes need to execute a health-check to the services. This would fail because it's not coming from a TDX instance. The solution is to spin up an optional additional server that responds 200 to requests.

@metachris metachris requested a review from Ruteri October 9, 2024 18:58
@metachris metachris force-pushed the healthcheck-server branch 2 times, most recently from 589abdc to dbe5a8f Compare October 9, 2024 19:00
&cli.StringFlag{
Name: "listen-addr-healthcheck",
EnvVars: []string{"LISTEN_ADDR_HEALTHCHECK"},
Value: "",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also provide a default value for the health check similar to the other flags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it's better to make opt-in for now, instead of starting it by default.

Comment on lines 47 to 48
EnvVars: []string{"TLS_CERTIFICATE"},
Usage: "Certificate to present (PEM). Only valid for --server-attestation-type=none and with --tls-private-key.",
Usage: "Path to TLS certificate (PEM). Only valid for --server-attestation-type=none and with --tls-private-key.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: since the usage is now explicitly mentioning the path, should the env var name also be changed accordingly?
Like TLS_CERTIFICATE_FILE or TLS_CERTIFICATE_PATH

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i guess that's right, but it'll need an update of our deployment too. better bite the bullet now though. updating

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@metachris metachris merged commit 4c1e54d into main Oct 10, 2024
2 checks passed
@metachris metachris deleted the healthcheck-server branch October 10, 2024 11:51
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.

3 participants