vcluster icon indicating copy to clipboard operation
vcluster copied to clipboard

fix(servicesync): correctly set service clusterIP

Open mayooot opened this issue 8 months ago • 2 comments

What issue type does this pull request address? (keep at least one, remove the others) /kind bugfix

What does this pull request do? Which issues does it resolve?

https://github.com/loft-sh/vcluster/issues/1926

Please provide a short message that should be published in the vcluster release notes

When I use syncer --map-host-service args to sync the serivce from the physical k8s cluster inside vcluster, the ClusterIP is None, which is present in every version of vcluster.

So I modified servicesync.go and built the image locally and tested it on a production vcluster and it works, synchronizing both the headless service and the clusterIP serivce.

Note that ClusterIP: fromService.Spec.ClusterIP is sufficient, there is no need to determine if fromService.Spec.ClusterIP is corev1.ClusterIPNone.

mayooot avatar Apr 25 '25 12:04 mayooot

Deploy Preview for vcluster-docs canceled.

Built without sensitive environment variables

Name Link
Latest commit dbd8fe09477e4b4985f0cd1cc747248601f24b8e
Latest deploy log https://app.netlify.com/sites/vcluster-docs/deploys/680b86765a92f30008eb1839

netlify[bot] avatar Apr 25 '25 12:04 netlify[bot]

@FabianKramm Please review this pr, thx.

mayooot avatar Apr 27 '25 06:04 mayooot