-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Option for MetalLB to talk BGP #6383
Changes from 4 commits
e4a174a
f185879
e54c174
e1eaa43
679610b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,14 @@ metadata: | |
name: config | ||
data: | ||
config: | | ||
{% if metallb_protocol == 'bgp' %} | ||
peers: | ||
{% for peer in metallb_peers %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If metallb_protocol is bgp, is metallb_peers mandatory to be specified? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not immediately clear if peers are mandatory for MetalLB, the documentation does say you need peer-address, peer-asn, and my-asn though, and as you noted the template modification I made makes metallb_peers a requirement. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when using BGP, peers is mandatory otherwise MetalLB doesn't know what router to connect to in order to advertise the routes
So I agree with @oomichi, we better add a validation check for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A check for metallb_peers was added to roles/kubernetes-apps/metallb/tasks/main.yml in f185879 |
||
- peer-address: {{ peer.peer_address }} | ||
peer-asn: {{ peer.peer_asn }} | ||
my-asn: {{ peer.my_asn }} | ||
{% endfor %} | ||
{% endif %} | ||
address-pools: | ||
- name: loadbalanced | ||
protocol: {{ metallb_protocol }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Miouge1 has a good point.
Here says we can enable both modes with
and/or
word but actuallymetallb_protocol
can accept a single protocol only.It is nice to have more discussion.
/lgtm cancel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metallb_additional_address_pools expect a protocol for each additional address pool, so "and/or" is correct as far as kubespray goes, but I've removed both instances of "and/".
Like @EppO said having both at once doesn't really make any practical sense.