Skip to content

Commit 702608f

Browse files
authored
xds: enable timeout, circuit breaking, and fault injection by default (#4286)
1 parent faf4e1c commit 702608f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

internal/xds/env/env.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ var (
6161
// When both bootstrap FileName and FileContent are set, FileName is used.
6262
BootstrapFileContent = os.Getenv(BootstrapFileContentEnv)
6363
// CircuitBreakingSupport indicates whether circuit breaking support is
64-
// enabled, which can be done by setting the environment variable
65-
// "GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING" to "true".
66-
CircuitBreakingSupport = strings.EqualFold(os.Getenv(circuitBreakingSupportEnv), "true")
64+
// enabled, which can be disabled by setting the environment variable
65+
// "GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING" to "false".
66+
CircuitBreakingSupport = !strings.EqualFold(os.Getenv(circuitBreakingSupportEnv), "false")
6767
// TimeoutSupport indicates whether support for max_stream_duration in
68-
// route actions is enabled. This can be enabled by setting the
69-
// environment variable "GRPC_XDS_EXPERIMENTAL_ENABLE_TIMEOUT" to "true".
70-
TimeoutSupport = strings.EqualFold(os.Getenv(timeoutSupportEnv), "true")
68+
// route actions is enabled. This can be disabled by setting the
69+
// environment variable "GRPC_XDS_EXPERIMENTAL_ENABLE_TIMEOUT" to "false".
70+
TimeoutSupport = !strings.EqualFold(os.Getenv(timeoutSupportEnv), "false")
7171
// FaultInjectionSupport is used to control both fault injection and HTTP
7272
// filter support.
73-
FaultInjectionSupport = strings.EqualFold(os.Getenv(faultInjectionSupportEnv), "true")
73+
FaultInjectionSupport = !strings.EqualFold(os.Getenv(faultInjectionSupportEnv), "false")
7474
// C2PResolverSupport indicates whether support for C2P resolver is enabled.
7575
// This can be enabled by setting the environment variable
7676
// "GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER" to "true".

xds/csds/csds_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ import (
2525
"testing"
2626
"time"
2727

28-
v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
29-
v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
30-
v3clusterpb "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
31-
v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3"
32-
v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
3328
"github.com/golang/protobuf/jsonpb"
3429
"github.com/golang/protobuf/proto"
3530
"github.com/golang/protobuf/ptypes"
@@ -39,14 +34,20 @@ import (
3934
"google.golang.org/grpc"
4035
"google.golang.org/grpc/internal/xds"
4136
"google.golang.org/grpc/xds/internal/client"
37+
_ "google.golang.org/grpc/xds/internal/httpfilter/router"
4238
"google.golang.org/grpc/xds/internal/testutils"
4339
"google.golang.org/grpc/xds/internal/testutils/e2e"
4440
"google.golang.org/protobuf/testing/protocmp"
4541
"google.golang.org/protobuf/types/known/anypb"
4642
"google.golang.org/protobuf/types/known/timestamppb"
4743

44+
v3adminpb "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
45+
v2corepb "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
46+
v3clusterpb "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
4847
v3corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
48+
v3endpointpb "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3"
4949
v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
50+
v3routepb "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
5051
v3statuspb "github.com/envoyproxy/go-control-plane/envoy/service/status/v3"
5152
)
5253

0 commit comments

Comments
 (0)