add control_plane_endpoint variable for external load balancer
Hello, Thanks for this amazing project!
In some setups, especially when using an external load balancer (e.g. HAProxy), agents and secondary control planes could connect to the cluster through a stable endpoint instead of directly using one of the control plane nodes.
When using the option enable_klipper_metal_lb = true it is sometimes useful to force setting an URL for the external load balancer.
This PR adds this option thanks to the new variable control_plane_endpoint.
Example:
control_plane_endpoint = "https://haproxy.mydomain.com:6443"
Note: I open this PR again to get a clean discussion history.
Thanks!
Summary of Changes
Hello @AdoPi, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request enhances the cluster configuration options by introducing a new control_plane_endpoint variable. This allows users to define a specific external URL for K3s agents and secondary control planes to connect to the cluster's API server. This feature is particularly beneficial for setups utilizing external load balancers, providing a stable and consistent entry point for cluster components, and decoupling the connection logic from internal IP addresses or the klipper-lb when it's enabled.
Highlights
- New Variable
control_plane_endpoint: Introduced a new optional variablecontrol_plane_endpointto specify an external URL for the Kubernetes control plane. - External Load Balancer Support: This variable allows K3s agents and secondary control planes to connect to the cluster via a stable external load balancer endpoint, such as HAProxy, instead of directly to control plane node IPs.
- Configuration Flexibility: The
control_plane_endpointvariable, when set, overrides the default server connection logic, providing more flexibility for cluster setups with custom load balancing.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
/gemini review
/gemini review
/gemini review
/gemini review
/gemini review
/gemini review
/gemini review
/gemini review
/gemini review
Could a human please review my code and maybe accept my PR if everything is alright :smile: ? @mysticaltech ? Thanks!
@AdoPi It's gonna be review weekend, on it ASAP
@codex review please, and let me know if backward compatible or not.
@codex review please, and let us know if backward compatible or not.
To use Codex here, create a Codex account and connect to github.
I will do it for you.
@codex review please
/gemini review
@codex review
@AdoPi FYI, sorry this is iterative. Both of the above are valid comments, please address. I intent to merge this before the next release, hopefully this week-end.
Sure no problem! I did the changes
/gemini review