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

Add option to disable MetalLB, for use w/ ext LBs #383

Merged
merged 3 commits into from
Oct 18, 2023
Merged

Add option to disable MetalLB, for use w/ ext LBs #383

merged 3 commits into from
Oct 18, 2023

Conversation

balazshasprai
Copy link
Contributor

Proposed Changes

Not sure how useful it'd be to the majority, since it's one of the project's best features.
But I thought it would be nice to have the option to disable MetalLB altogether, too.
(By default it still being enabled)
Instead, you could use an external load balancer, like HAProxy, maybe on your pfSense/OPNsense instance, if you're using it for something already.

I've been using this project in my homelab and MetalLB is wonderful. Works great, very convenient.
Now it seems we'll use this at work too, since you know, why reinvent the wheel?
But, we already have big beefy purpose built hardware load balancers in use, we'd like to use them with a NodePort type ingress, without deviating / maintaining a separate fork of the project.

As you can see in the commit, I've only added a simple metal_lb_configure: true on/off switch, the default being on, and a condition in the k3s_server and k3s_server_post main.yml where the metallb tasks get included.

Checklist

  • Tested locally
  • Ran site.yml playbook
  • Ran reset.yml playbook
  • Did not add any unnecessary changes
  • Ran pre-commit install at least once before committing
  • 🚀

@balazshasprai
Copy link
Contributor Author

I swear github doesn't like me, ran the checks successfully before the pr

@balazshasprai
Copy link
Contributor Author

balazshasprai commented Oct 18, 2023

I should probably add a default true var in the roles' defaults/main.yml too, so people who are using it with an already existing inventory don't run into undefined variable errors.

Edit: I added the defaults. Pretty new to github, didn't know the new commit would show up in this pr, pretty cool

@timothystewart6
Copy link
Contributor

Thank you! I am wondering if it would be better to just add tags that could be skipped, rather than adding a flag not to configure or install. See this PR. https://github.com/techno-tim/k3s-ansible/pull/373/files

@balazshasprai
Copy link
Contributor Author

Oh yeah, that's way better! Pushed

@timothystewart6
Copy link
Contributor

Thank you!

@timothystewart6
Copy link
Contributor

timothystewart6 commented Oct 18, 2023

I think we're missing it on a few more metallb resources

disregard!

@timothystewart6 timothystewart6 merged commit 95b2836 into techno-tim:master Oct 18, 2023
5 checks 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