Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions balancer/ringhash/ringhash_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,17 @@ func (s) TestRingHash_AggregateClusterFallBackFromRingHashAtStartup(t *testing.T
primaryCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: primaryClusterName,
ServiceName: primaryServiceName,
Policy: e2e.LoadBalancingPolicyRingHash,
})
secondaryCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: secondaryClusterName,
ServiceName: secondaryServiceName,
Policy: e2e.LoadBalancingPolicyRingHash,
})
cluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: clusterName,
Type: e2e.ClusterTypeAggregate,
// TODO: when "A75: xDS Aggregate Cluster Behavior Fixes" is implemented, the
// policy will have to be set on the child clusters.
Policy: e2e.LoadBalancingPolicyRingHash,
ChildNames: []string{primaryClusterName, secondaryClusterName},
ChildNames: []string{primaryClusterName, secondaryClusterName},
})
route := channelIDHashRoute("new_route", virtualHostName, clusterName)
listener := e2e.DefaultClientListener(virtualHostName, route.Name)
Expand Down Expand Up @@ -441,6 +440,7 @@ func (s) TestRingHash_AggregateClusterFallBackFromRingHashToLogicalDnsAtStartup(
edsCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: edsClusterName,
ServiceName: edsClusterName,
Policy: e2e.LoadBalancingPolicyRingHash,
})

logicalDNSCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
Expand All @@ -450,14 +450,12 @@ func (s) TestRingHash_AggregateClusterFallBackFromRingHashToLogicalDnsAtStartup(
// are required to be present for the resource to be valid.
DNSHostName: "server.example.com",
DNSPort: 443,
Policy: e2e.LoadBalancingPolicyRingHash,
})
cluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: clusterName,
Type: e2e.ClusterTypeAggregate,
// TODO: when "A75: xDS Aggregate Cluster Behavior Fixes" is merged, the
// policy will have to be set on the child clusters.
Policy: e2e.LoadBalancingPolicyRingHash,
ChildNames: []string{edsClusterName, logicalDNSClusterName},
ChildNames: []string{edsClusterName, logicalDNSClusterName},
})
route := channelIDHashRoute("new_route", virtualHostName, clusterName)
listener := e2e.DefaultClientListener(virtualHostName, route.Name)
Expand Down Expand Up @@ -521,6 +519,7 @@ func (s) TestRingHash_AggregateClusterFallBackFromRingHashToLogicalDnsAtStartupN
edsCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: edsClusterName,
ServiceName: edsClusterName,
Policy: e2e.LoadBalancingPolicyRingHash,
})

logicalDNSCluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
Expand All @@ -530,14 +529,12 @@ func (s) TestRingHash_AggregateClusterFallBackFromRingHashToLogicalDnsAtStartupN
// are required to be present for the resource to be valid.
DNSHostName: "server.example.com",
DNSPort: 443,
Policy: e2e.LoadBalancingPolicyRingHash,
})
cluster := e2e.ClusterResourceWithOptions(e2e.ClusterOptions{
ClusterName: clusterName,
Type: e2e.ClusterTypeAggregate,
// TODO: when "A75: xDS Aggregate Cluster Behavior Fixes" is merged, the
// policy will have to be set on the child clusters.
Policy: e2e.LoadBalancingPolicyRingHash,
ChildNames: []string{edsClusterName, logicalDNSClusterName},
ChildNames: []string{edsClusterName, logicalDNSClusterName},
})
route := channelIDHashRoute("new_route", virtualHostName, clusterName)
listener := e2e.DefaultClientListener(virtualHostName, route.Name)
Expand Down
11 changes: 11 additions & 0 deletions internal/envconfig/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,15 @@ var (
// XDSAutoshardingEnabled controls whether the autosharding LB policy is
// supported by the xDS LB policy registry. See gRFC A119 for more details.
XDSAutoshardingEnabled = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_AUTOSHARDING_LB", false)

// XDSAggregateClusterBackwardCompat controls whether the underlying
// (leaf) clusters of an aggregate cluster use the LB policy configured in
// the aggregate cluster instead of their own LB policy. This is a
// temporary migration mechanism and will be removed in a future release.
// For more details, see:
// https://github.com/grpc/proposal/blob/master/A75-xds-aggregate-cluster-behavior-fixes.md
//
// TODO: Remove this, and all the code that depends on it, after a couple
// of releases.
XDSAggregateClusterBackwardCompat = boolFromEnv("GRPC_XDS_AGGREGATE_CLUSTER_BACKWARD_COMPAT", false)
)
Loading
Loading