mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +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)
|
||||
AlphaFeatureNetworkTiers = "NetworkTiers"
|
||||
AlphaFeatureILBSubsets = "ILBSubsets"
|
||||
)
|
||||
|
||||
// AlphaFeatureGate contains a mapping of alpha features to whether they are enabled
|
||||
|
@ -36,9 +36,13 @@ const (
|
||||
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) {
|
||||
if g.AlphaFeatureGate.Enabled("ILBSubsets") {
|
||||
return nil, cloudprovider.NotImplemented
|
||||
if g.usesSubsets() {
|
||||
return nil, cloudprovider.ImplementedElsewhere
|
||||
}
|
||||
|
||||
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
|
||||
// and possibly the backend service need to be updated.
|
||||
func (g *Cloud) updateInternalLoadBalancer(clusterName, clusterID string, svc *v1.Service, nodes []*v1.Node) error {
|
||||
if g.AlphaFeatureGate.Enabled("ILBSubsets") {
|
||||
return cloudprovider.NotImplemented
|
||||
if g.usesSubsets() {
|
||||
return cloudprovider.ImplementedElsewhere
|
||||
}
|
||||
g.sharedResourceLock.Lock()
|
||||
defer g.sharedResourceLock.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user