kubernetes / cloud-provider-vsphere

Kubernetes Cloud Provider for vSphere https://cloud-provider-vsphere.sigs.k8s.io
Apache License 2.0
244 stars 177 forks source link

support for loadBalancerSourceRanges #498

Closed moonek closed 2 years ago

moonek commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:

The loadBalancerSourceRanges field of the k8s service object spec is intended to control access to the client ip.

spec:
  loadBalancerSourceRanges:
    - "123.123.123.0/24"

This feature works by kube-proxy in in-cluster, but should also apply to external loadbalancer.

It seems to be implemented in the pkg/cloudprovider/vsphereparavirtual source. https://github.com/kubernetes/cloud-provider-vsphere/blob/master/pkg/cloudprovider/vsphereparavirtual/vmservice/vmservice.go#L220

However, the environment I use seems to work by referring to the pkg/cloudprovider/vsphere source. The loadBalancerSourceRanges feature is not implemented in this pkg.

It seems to be related to the nsx-t virtual server acl setting and loadBalancerSourceRanges.

Any plans for support for this feature?

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

lubronzhan commented 2 years ago

Fixed in add snat disable flag to preserve client IP when using inline mode #523

moonek commented 2 years ago

@lubronzhan The snatDisabled flag is a prerequisite for developing loadBalancerSourceRanges. Currently the loadBalancerSourceRanges feature is not in pkg/cloudprovider/vsphere. Therefore, this issue cannot be closed. I can develop it later.