diff --git a/api/v1alpha1/vrfrouteconfiguration_types.go b/api/v1alpha1/vrfrouteconfiguration_types.go index 96796b7d..e2d0e111 100644 --- a/api/v1alpha1/vrfrouteconfiguration_types.go +++ b/api/v1alpha1/vrfrouteconfiguration_types.go @@ -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"` diff --git a/config/crd/bases/network.schiff.telekom.de_vrfrouteconfigurations.yaml b/config/crd/bases/network.schiff.telekom.de_vrfrouteconfigurations.yaml index 9cfb0749..7f73a23e 100644 --- a/config/crd/bases/network.schiff.telekom.de_vrfrouteconfigurations.yaml +++ b/config/crd/bases/network.schiff.telekom.de_vrfrouteconfigurations.yaml @@ -139,7 +139,6 @@ spec: required: - export - import - - mtu - seq type: object status: diff --git a/pkg/nl/layer3.go b/pkg/nl/layer3.go index 9b6fd5fe..1c8f4ed6 100644 --- a/pkg/nl/layer3.go +++ b/pkg/nl/layer3.go @@ -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) } }