-
Notifications
You must be signed in to change notification settings - Fork 618
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
chore: add generic methods and use them part 2/2 #5720
Conversation
@@ -53,7 +53,8 @@ func Generate(ctx context.Context, in *machine.GenerateConfigurationRequest) (re | |||
DeviceCIDR: device.Cidr, | |||
DeviceDHCP: device.Dhcp, | |||
DeviceIgnore: device.Ignore, | |||
DeviceRoutes: routes, | |||
// TODO: this looks strange, since its always empty de-facto. |
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.
I have no idea whats happening here
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.
@Unix4ever should know! I think it should be a copy, but ?
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.
probably copy(routes, device.Routes)
before this place is missing
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.
😎
Use things from siderolabs#5702. Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
I added DeviceRoutes: slices.Map(device.Routes, func(route *machine.RouteConfig) *v1alpha1.Route {
return &v1alpha1.Route{
RouteNetwork: route.Network,
RouteGateway: route.Gateway,
RouteMetric: route.Metric,
}
}), |
FYI @Unix4ever |
/m |
Use things from #5702.
Signed-off-by: Dmitriy Matrenichev dmitry.matrenichev@siderolabs.com
This change is