vcluster icon indicating copy to clipboard operation
vcluster copied to clipboard

Sync the .status.loadBalancer field of the mapped Services.

Open matskiv opened this issue 3 years ago • 5 comments

Is your feature request related to a problem?

Services created by vcluster based on the configured service mapping are lacking status, which means that it is not possible to read for example the IP of the assigned load balancer.

Which solution do you suggest?

Sync the .status.loadBalancer field of the mapped Services.

Which alternative solutions exist?

No viable solution. A workaround is to read the .status.loadBalancer from the source Service, but that requires additional knowledge, access, and manual effort from the user.

Additional context

This is the controller that executes synchronization of the mapped Services: https://github.com/loft-sh/vcluster/blob/main/pkg/controllers/servicesync/servicesync.go

matskiv avatar Sep 13 '22 17:09 matskiv

/assign

rahulii avatar Sep 14 '22 12:09 rahulii

https://github.com/loft-sh/vcluster/blob/main/pkg/controllers/register.go#L324 hey @matskiv as per this func it says please use namespace1/service1=service2 service mapping but as per the docs https://www.vcluster.com/docs/architecture/networking#map-host-cluster-service-to-vcluster-service the format is bit different ? Am I missing something here ? cc: @FabianKramm

rahulii avatar Sep 15 '22 09:09 rahulii

@rahulii The docs describe how to write the mapping in the helm values, it is then transformed into a different format to pass it as a CLI flag - https://github.com/loft-sh/vcluster/blob/09b0fd82c1ab8e820a6ed1fa342cb2dd443419e2/charts/k3s/templates/_helpers.tpl#L113-L129

matskiv avatar Sep 15 '22 10:09 matskiv

@matskiv I have the fix ready but since this requires loadbalancer service I would need cloud clusters to test , right ? or any other way ?

rahulii avatar Sep 16 '22 13:09 rahulii

@rahulii You could test it with minikube too. Use minikube tunnel command. Docs: https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-tunnel

matskiv avatar Sep 16 '22 13:09 matskiv