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 MTU optional for VRFrouteconfiguration #138

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/v1alpha1/vrfrouteconfiguration_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type VRFRouteConfigurationSpec struct {
// Sequence of the generated route-map, maximum of 65534 because we sometimes have to set an explicit default-deny
Seq int `json:"seq"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=9000
// The MTU of the VRF
MTU int `json:"mtu"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ spec:
required:
- export
- import
- mtu
- seq
type: object
status:
Expand Down
2 changes: 1 addition & 1 deletion pkg/nl/layer3.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (n *Manager) EnsureMTU(info VRFInformation) error {
return fmt.Errorf("error getting default2vrf interface of vrf %s: %w", info.Name, err)
}
if link.Attrs().MTU != info.linkMTU() {
if err := n.toolkit.LinkSetMTU(link, info.MTU); err != nil {
if err := n.toolkit.LinkSetMTU(link, info.linkMTU()); err != nil {
return fmt.Errorf("error setting MTU of default2vrw interface of vrf %s: %w", info.Name, err)
}
}
Expand Down