digitalsimboja | Hello! @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 |
---|---|---|
ltomasbo | you will need a different name for the service at the very least | 10:04 |
maysams | digitalsimboja: no need, you can expose the same deployment. However, your service needs to have a different name | 10:04 |
digitalsimboja | Currently 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_crd | 10:04 |
digitalsimboja | Got it! | 10:05 |
digitalsimboja | Thanks | 10:05 |
digitalsimboja | So I have created a driver_utils utility function and am able to fetch the KuryrCRDs | 10:05 |
digitalsimboja | working on the reconcile loop currently | 10:05 |
digitalsimboja | should have something up before end of day | 10:05 |
digitalsimboja | You can check the VM for progress though | 10:06 |
maysams | cool, once you publish the patchset we will check it out ;) | 10:06 |
digitalsimboja | Perfect | 10:08 |
opendevreview | Sunday Mgbogu proposed openstack/kuryr-kubernetes master: wip: Loadbalancers reconciliation https://review.opendev.org/c/openstack/kuryr-kubernetes/+/798904 | 14:32 |
digitalsimboja | Now on the actual reconciliation implementation | 14: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 |
digitalsimboja | If there is no way then I can use the utility function _res_link and pass the names of the crds that are not in OpenStack | 14:51 |
digitalsimboja | ? | 14:51 |
ltomasbo | digitalsimboja, you mean the openstack loadbalancer ID to get the kuryrloadbalancer CRD? | 14:53 |
digitalsimboja | sure | 14:54 |
digitalsimboja | so I can delete its status | 14:54 |
digitalsimboja | No | 14:54 |
digitalsimboja | NO | 14:55 |
digitalsimboja | Let me rephrase | 14:55 |
digitalsimboja | I beleive the loadbalancer id on kuryrLB CRD is same as in OpenStack? | 14:55 |
digitalsimboja | If so | 14:55 |
digitalsimboja | Any 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 status | 14:56 |
digitalsimboja | Hope that is correct? | 14:56 |
digitalsimboja | sort of passing the namespace and the id instead of passing the namespace and name | 14:58 |
ltomasbo | the information on the klb CRD status is pointing to the openstack loadbalancer, yes | 15:00 |
ltomasbo | the kuryrlb crd has therefore the information about the OpenStack loadbalancer ID | 15:01 |
ltomasbo | but, you cannot search the kuryrLB CRD by that id (as that is the information store on the status, not the metadata) | 15:01 |
ltomasbo | digitalsimboja, ^ | 15:03 |
digitalsimboja | okay | 15:03 |
digitalsimboja | I know I can search with the name? | 15:04 |
digitalsimboja | If so, then I need to pass the names of those loadbalancers not in OpenStack then | 15:04 |
digitalsimboja | correct? | 15:04 |
ltomasbo | when 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, etc | 15:05 |
ltomasbo | ohh, right | 15:05 |
digitalsimboja | Now 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 KuryrCRD | 15:07 |
ltomasbo | btw, I think you are doing the loop wrong | 15:08 |
ltomasbo | it should be the other way around... you loop on the list of IDs from the KLB CRD status | 15:08 |
ltomasbo | and then if they are not in the list returned by openstack (the ids), then remove the status of the CRD | 15:09 |
ltomasbo | digitalsimboja, ^ | 15:09 |
digitalsimboja | I will check this | 15:09 |
ltomasbo | digitalsimboja, you just need to cover the case where the CRD has a loadbalancer ID that no-longer exists | 15:10 |
ltomasbo | the 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 |
ltomasbo | so, you get the ids from the klb crd status | 15:11 |
ltomasbo | then get the ids from the openstack API | 15:11 |
ltomasbo | and 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 reconciliation | 15:11 |
digitalsimboja | wait a minute, status IDs you mean represent the status['loadbalancer']['id'] right? | 15:13 |
ltomasbo | yep | 15:14 |
ltomasbo | basically, needs to check if what is stored on the crd status regarding the OpenStack resources is still there | 15:14 |
ltomasbo | so, if the ID of the loadbalancer annotated on the CRD status still exists on the OpenStack side | 15:15 |
digitalsimboja | Okay I see where I got it wrong | 15:16 |
digitalsimboja | My if statement should be checking whether there are loadbalancer_id on Kuryr CRD missing on openstack | 15:16 |
digitalsimboja | so should be the other way around | 15:16 |
ltomasbo | exactly! | 15:20 |
opendevreview | Sunday Mgbogu proposed openstack/kuryr-kubernetes master: wip: Loadbalancers reconciliation https://review.opendev.org/c/openstack/kuryr-kubernetes/+/798904 | 16:05 |
opendevreview | Sunday Mgbogu proposed openstack/kuryr-kubernetes master: Added the Service Creation Flow Diagram https://review.opendev.org/c/openstack/kuryr-kubernetes/+/798064 | 19:44 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!