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 a proposal to move frr as a separate daemonset #1933

Merged
merged 1 commit into from
Jun 7, 2023

Conversation

fedepaol
Copy link
Member

Instead of running frr as a side container, here we propose to move it as a separate daemon with its own API, that can be alimented both by the user and by MetalLB.

This would serve all those use cases where the users require to have a FRR-like process running on the cluster's nodes and currently can't because of technical limitations.

design/splitfrr-proposal.md Outdated Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
@fedepaol fedepaol force-pushed the design/splitfrr branch 2 times, most recently from 7ff7132 to 090a9a9 Compare May 30, 2023 15:50
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Outdated Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Show resolved Hide resolved
@fedepaol fedepaol force-pushed the design/splitfrr branch 2 times, most recently from 3d568c1 to bdec09d Compare May 31, 2023 12:39
@gclawes
Copy link
Collaborator

gclawes commented Jun 1, 2023

I like this idea. I've wondered in the past about running PIM in a kubernetes cluster, I think depending on the CNI it could be used to bring native multicast up to pods. This seems like a cool possible path to get frr to do that in addition to BGP.

type AllowedPrefixes struct {
Prefixes []string `json:"prefixes,omitempty"`
// +kubebuilder:validation:Enum=all;filtered
Mode string `json:"mode,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think setting a struct here and putting the validation on it is cleaner (and probably easier to manage), i.e:

Mode AllowMode `json:"mode,omitempty"`

// +kubebuilder:validation:Enum=all;filtered
type AllowMode string

const (
	// ...
	AllowAll AllowMode = "all"
	// ...
	AllowRestricted AllowMode = "filtered"
)

wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

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

sounds good, TIL you can put constraints on a type

design/splitfrr-proposal.md Show resolved Hide resolved
}

type AllowedPrefixes struct {
Prefixes []string `json:"prefixes,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

nit: do we expect this to be an array of CIDRs? leaving this here for now

// +kubebuilder:validation:Format="cidr"

as it might come in handy later 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add it to the actual implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

(thanks)

design/splitfrr-proposal.md Show resolved Hide resolved
design/splitfrr-proposal.md Outdated Show resolved Hide resolved
metadata:
name:advertisement
namespace: metallb-system
spec: peers: peer1
Copy link
Member

Choose a reason for hiding this comment

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

nit: same

port: 179
toAdvertise:
allowed:
- 192.168.10.0/32
Copy link
Member

Choose a reason for hiding this comment

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

missing mode?

Copy link
Member Author

Choose a reason for hiding this comment

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

nope. The default is filtered (it used to be a bool). We'll explicit the default value in the implementation.

Copy link
Member Author

Choose a reason for hiding this comment

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

left comments on the api structure

}

type Advertise struct {
AllowedPrefixes `json:"allowed,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

what happens when there's only

allowed:
  - mode: "all"

does it mean that nothing is actually advertised? (I feel like a few comments around the fields would solve some of these questions 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope, it means that all the prefixes configured in the router are actually advertised

}

type Neighbor struct {
Address string `json:"address"`
Copy link
Member

Choose a reason for hiding this comment

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

nit: same as the cidr note, might need proper validation later

Comment on lines +429 to +450
On the other hand, the MetalLB Operator will be changed so it can deploy this
new component too.
Copy link
Member

Choose a reason for hiding this comment

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

do you mean here that the operator will be able to deploy FRR as a standalone (i.e a new FRR CRD), or as part of the MetalLB resource?

Copy link
Member Author

Choose a reason for hiding this comment

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

as a starter I'd let the operator deploy frr together with metallb, because metallb requires it to function. IIRC, olm allows to specify operator dependencies or something like that, so it might be that in the future this thing has its own operator.

Instead of running frr as a side container, here we propose to move it
as a separate daemon with its own API, that can be alimented both by the
user and by MetalLB.

This would serve all those use cases where the users require to have a
FRR-like process running on the cluster's nodes and currently can't
because of technical limitations.

Signed-off-by: Federico Paolinelli <fpaoline@redhat.com>
Copy link
Member

@oribon oribon left a comment

Choose a reason for hiding this comment

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

lgtm

@fedepaol
Copy link
Member Author

fedepaol commented Jun 7, 2023

I like this idea. I've wondered in the past about running PIM in a kubernetes cluster, I think depending on the CNI it could be used to bring native multicast up to pods. This seems like a cool possible path to get frr to do that in addition to BGP.

yep there are a few users that asked for extra frr configuration and running two instances is not ideal. There's a good chance the set of features exposed will grow with users' demand.

@fedepaol fedepaol merged commit 363872e into metallb:main Jun 7, 2023
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.

None yet

3 participants