Wednesday, 2021-06-30

digitalsimbojaHello! @ltomasbo, @maysams: I was trying to expose another service on k8s so I can have more than one lb_crd, Do I need to create a seperate deployment before I can achieve this?10:03
ltomasboyou will need a different name for the service at the very least10:04
maysamsdigitalsimboja: no need, you can expose the same deployment. However, your service needs to have a different name10:04
digitalsimbojaCurrently I have one pod running and one service exposed for that pod: Do I need to create another pod deployment before I can expose another service to have more than one lb_crd10:04
digitalsimbojaGot it!10:05
digitalsimbojaThanks10:05
digitalsimbojaSo I have created a driver_utils utility function and am able to fetch the KuryrCRDs10:05
digitalsimbojaworking on the reconcile loop currently10:05
digitalsimbojashould have something up before end of day10:05
digitalsimbojaYou can check the VM for progress though10:06
maysamscool, once you publish the patchset we will check it out ;)10:06
digitalsimbojaPerfect10:08
opendevreviewSunday Mgbogu proposed openstack/kuryr-kubernetes master: wip: Loadbalancers reconciliation  https://review.opendev.org/c/openstack/kuryr-kubernetes/+/79890414:32
digitalsimbojaNow on the actual reconciliation implementation14:32
digitalsimboja@ltomasbo, @maysams: I was asking if I could use the loadbalancer_crd 'id' to get the crd from kubernetes instead of the 'name'?14:51
digitalsimbojaIf there is no way then I can use the utility function _res_link and pass the names of the crds that are not in OpenStack14:51
digitalsimboja?14:51
ltomasbodigitalsimboja, you mean the openstack loadbalancer ID to get the kuryrloadbalancer CRD?14:53
digitalsimbojasure14:54
digitalsimbojaso I can delete its status14:54
digitalsimbojaNo 14:54
digitalsimbojaNO14:55
digitalsimbojaLet me rephrase14:55
digitalsimbojaI beleive the loadbalancer id on kuryrLB CRD is same as in OpenStack?14:55
digitalsimbojaIf so14:55
digitalsimbojaAny missing loadbalancer on OpenStack which is in KuryrLB CRD, I need to use the loadbalancer_id to get the resource in k8s and then delete the status14:56
digitalsimbojaHope that is correct?14:56
digitalsimbojasort of passing the namespace and the id instead of passing the namespace and name14:58
ltomasbothe information on the klb CRD status is pointing to the openstack loadbalancer, yes15:00
ltomasbothe kuryrlb crd has therefore the information about  the OpenStack loadbalancer ID15:01
ltomasbobut, you cannot search the kuryrLB CRD by that id (as that is the information store on the status, not the metadata)15:01
ltomasbodigitalsimboja, ^15:03
digitalsimbojaokay15:03
digitalsimbojaI know I can search with the name?15:04
digitalsimbojaIf so, then I need to pass the names of those loadbalancers not in OpenStack then15:04
digitalsimbojacorrect?15:04
ltomasbowhen you process the information return by openstack regarding all the loadbalancers, you can create a python dict with the information you may need later, such as the name associated to the id, the listeners, etc15:05
ltomasboohh, right15:05
digitalsimbojaNow I have got a challange, checking the VM, you would realise that the two KuryrLoadbalancer IDs are not in OpenStack, instead OpenStack is holding one loadbalancer that is different from what is on KuryrCRD15:07
ltomasbobtw, I think you are doing the loop wrong15:08
ltomasboit should be the other way around... you loop on the list of IDs from the KLB CRD status15:08
ltomasboand then if they are not in the list returned by openstack (the ids), then remove the status of the CRD15:09
ltomasbodigitalsimboja, ^15:09
digitalsimbojaI will check this15:09
ltomasbodigitalsimboja, you just need to cover the case where the CRD has a loadbalancer ID that no-longer exists15:10
ltomasbothe other case should already be covered by the code, so you don't need to worry about the opossite case (loadbalancer on openstack that does not have a KuryrLB CRD)15:10
ltomasboso, you get the ids from the klb crd status15:11
ltomasbothen get the ids from the openstack API15:11
ltomasboand then iterate on the klb crd status IDs, checking if the ID is present on the returned information by openstack API, and if not, triggering the reconciliation15:11
digitalsimbojawait a minute, status IDs you mean represent the status['loadbalancer']['id'] right?15:13
ltomasboyep15:14
ltomasbobasically, needs to check if what is stored on the crd status regarding the OpenStack resources is still there15:14
ltomasboso, if the ID of the loadbalancer annotated on the CRD status still exists on the OpenStack side15:15
digitalsimbojaOkay I see where I got it wrong15:16
digitalsimbojaMy if statement should be checking whether there are loadbalancer_id on Kuryr CRD missing on openstack15:16
digitalsimbojaso should be the other way around15:16
ltomasboexactly!15:20
opendevreviewSunday Mgbogu proposed openstack/kuryr-kubernetes master: wip: Loadbalancers reconciliation  https://review.opendev.org/c/openstack/kuryr-kubernetes/+/79890416:05
opendevreviewSunday Mgbogu proposed openstack/kuryr-kubernetes master: Added the Service Creation Flow Diagram  https://review.opendev.org/c/openstack/kuryr-kubernetes/+/79806419:44

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!