Skip to content
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

Make HAProxy better at knowing when to pull kubernetes controller nodes from load balancing #654

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

daaang
Copy link
Collaborator

@daaang daaang commented Jan 26, 2024

HAProxy's TCP check must be essentially no more than nc -v, which was succeeding on a controller node that was very much unavailable. curl -k (and ssh) was timing out, so this pull request aims to make HAProxy do something closer to curl -k. When controller nodes are up and working, as of writing, curl -k https://addr:6443/ without any attempt at valid client certs yields a prompt 403 status.

I'm about to add a third kind of haproxy server, and making a third
almost identical set of tests seemed bad.
balance roundrobin
option httpchk HEAD /
http-check expect status 403
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not especially happy running essentially curl -k and considering 403 Forbidden to be "success," but the aim here is not to test our PKI but rather to check that a server is ready to receive requests, and if not, remove it from load balancing. Assuming that we don't have valid certs, 403 is in fact the expected behavior.

If some later version of kubernetes decides to switch to 401 or something, I believe it will be impossible not to notice in the test cluster.

@daaang daaang merged commit 8067f9b into master Jan 26, 2024
1 check passed
@daaang daaang deleted the haproxy-check-kubeapi-https-instead-of-tcp branch January 26, 2024 19:58
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