Open KapilYadava opened 1 year ago
something like this:
apiVersion: networking.api.onmetal.de/v1alpha1 kind: NetworkInterface metadata: name: networkinterface-1 spec: networkRef: name: network-1 // to be updated status: MachineRef: name: vm-1 status: Running
[Monday 14:31] Stößel, Manuel
Hi Kapil, I don't think you really need point 1, you already have a machineref in the networkinterfacespec as we saw in the code. If that's used, every controller can just look up the status of the referenced machine itself. I don't think we need to copy a machineref plus machine status to the networkinterface status. But maybe I didn't completely understood what your reasons were for that.
Add watches function to setUpManager() in LB controller to watch network interface status and filter out NICs on the basis of network interface networkInterface.Status.MachineRef.status. (onmetal-api)
Update NICs in LBR object at reconcile loop. (onmetal-api)
Implementation is done: https://github.com/onmetal/onmetal-api/compare/feature/lb_health_check?expand=1
waiting for lab access to onmetal-api cluster
Greetings, May I inquire as to what assistance you require from us?
@LanDeleih, I need to access to the test lab so that I can deploy change to onmetal-api cluster, controller to be deployed.
@LanDeleih, I need to access to the test lab so that I can deploy change to onmetal-api cluster, controller to be deployed.
Hello.
Regarding the issue created in our repository, please allow me to clarify that our team is not responsible for onmetal-api
or the test environment. Do you need us to make a feature for baremetal
servers? If that is indeed what you require, could you specify what exactly you need us to implement?
@LanDeleih it is not the right repo actually, as per our recent discussion I think this issue will be moved to dp-service. Is possible to change repo now ? I tried but I could not do that.
This is not dp-service related. Please talk to me first before moving issues to dp-service. @LanDeleih @KapilYadava Please remove this one from dp-service and move it to metalnet and please clarify what is the problem and what is being tried to be done here.
As discussed with @KapilYadava, removing of LBs is already supported in dp-service. It is on the orchestration to actually do it based on health checks. One possible solution is to implement it in metalbond with a tiny change to metalnet, but that is not something that can be decided in this (dp-service) project.
Had discussion today with onmetal-api and virtualization team
Further discussion
Solution:
Watches( &source.Kind{Type: &computev1alpha1.Machine{}}, handler.Funcs{ UpdateFunc: func(event event.UpdateEvent, queue workqueue.RateLimitingInterface) { machine := event.ObjectNew.(*computev1alpha1.Machine) for _, nic := range machine.Spec.NetworkInterfaces { queue.Add(ctrl.Request{NamespacedName: types.NamespacedName{Name: nic.Name}}) } } }, }, ).