mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
skip ilb creation if subsetting is enabled.
This commit is contained in:
parent
d79d4e8525
commit
acaa16c272
@ -26,6 +26,7 @@ const (
|
|||||||
//
|
//
|
||||||
// alpha: v1.8 (for Services)
|
// alpha: v1.8 (for Services)
|
||||||
AlphaFeatureNetworkTiers = "NetworkTiers"
|
AlphaFeatureNetworkTiers = "NetworkTiers"
|
||||||
|
AlphaFeatureILBSubsets = "ILBSubsets"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AlphaFeatureGate contains a mapping of alpha features to whether they are enabled
|
// AlphaFeatureGate contains a mapping of alpha features to whether they are enabled
|
||||||
|
@ -36,9 +36,13 @@ const (
|
|||||||
allInstances = "ALL"
|
allInstances = "ALL"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (g *Cloud) usesSubsets() bool {
|
||||||
|
return g.AlphaFeatureGate != nil && g.AlphaFeatureGate.Enabled(AlphaFeatureILBSubsets)
|
||||||
|
}
|
||||||
|
|
||||||
func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
|
func (g *Cloud) ensureInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) {
|
||||||
if g.AlphaFeatureGate.Enabled("ILBSubsets") {
|
if g.usesSubsets() {
|
||||||
return nil, cloudprovider.NotImplemented
|
return nil, cloudprovider.ImplementedElsewhere
|
||||||
}
|
}
|
||||||
|
|
||||||
nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace}
|
nm := types.NamespacedName{Name: svc.Name, Namespace: svc.Namespace}
|
||||||
@ -206,8 +210,8 @@ func (g *Cloud) clearPreviousInternalResources(svc *v1.Service, loadBalancerName
|
|||||||
// updateInternalLoadBalancer is called when the list of nodes has changed. Therefore, only the instance groups
|
// updateInternalLoadBalancer is called when the list of nodes has changed. Therefore, only the instance groups
|
||||||
// and possibly the backend service need to be updated.
|
// and possibly the backend service need to be updated.
|
||||||
func (g *Cloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, nodes []*v1.Node) error {
|
func (g *Cloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, nodes []*v1.Node) error {
|
||||||
if g.AlphaFeatureGate.Enabled("ILBSubsets") {
|
if g.usesSubsets() {
|
||||||
return cloudprovider.NotImplemented
|
return cloudprovider.ImplementedElsewhere
|
||||||
}
|
}
|
||||||
g.sharedResourceLock.Lock()
|
g.sharedResourceLock.Lock()
|
||||||
defer g.sharedResourceLock.Unlock()
|
defer g.sharedResourceLock.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user