Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(meshtimeout): don't set default timeouts on inbound cluster and listener (backport of #12043) #12048

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: localhost:8080
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
address:
socketAddress:
address: 127.0.0.1
portValue: 80
enableReusePort: false
filterChains:
- filters:
- name: envoy.filters.network.http_connection_manager
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
httpFilters:
- name: envoy.filters.http.router
typedConfig:
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
routeConfig:
name: inbound:backend
requestHeadersToRemove:
- x-kuma-tags
validateClusters: false
virtualHosts:
- domains:
- '*'
name: backend
routes:
- match:
prefix: /
route:
cluster: backend
timeout: 0s
statPrefix: inbound_127_0_0_1_80
name: inbound:127.0.0.1:80
trafficDirection: INBOUND
7 changes: 7 additions & 0 deletions pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@
}

protocol := core_mesh.ParseProtocol(inbound.GetProtocol())
<<<<<<< HEAD

Check failure on line 86 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected <<, expected }

Check failure on line 86 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

expected statement, found '<<' (typecheck)

Check failure on line 86 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected <<, expected }
=======

Check failure on line 87 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected ==, expected }

Check failure on line 87 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

syntax error: unexpected ==, expected }
conf := getConf(fromRules.Rules[listenerKey], core_rules.MeshSubset())
if conf == nil {
continue
}
>>>>>>> 844c9881c (fix(meshtimeout): don't set default timeouts on inbound cluster and listener (#12043))

Check failure on line 92 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

newline in rune literal (typecheck)

Check failure on line 92 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

expected statement, found '>>' (typecheck)

Check failure on line 92 in pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin.go

View workflow job for this annotation

GitHub Actions / check

newline in rune literal) (typecheck)
configurer := plugin_xds.ListenerConfigurer{
Rules: fromRules.Rules[listenerKey],
Subset: core_rules.MeshSubset(),
Expand Down
24 changes: 24 additions & 0 deletions pkg/plugins/policies/meshtimeout/plugin/v1alpha1/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,30 @@ var _ = Describe("MeshTimeout", func() {
expectedClusters: []string{"basic_inbound_cluster.golden.yaml"},
expectedListeners: []string{"basic_inbound_listener.golden.yaml"},
}),
Entry("basic inbound route without defaults", sidecarTestCase{
resources: []core_xds.Resource{
{
Name: "inbound",
Origin: generator.OriginInbound,
Resource: httpInboundListenerWith(),
},
{
Name: "inbound",
Origin: generator.OriginInbound,
Resource: test_xds.ClusterWithName(fmt.Sprintf("localhost:%d", builders.FirstInboundServicePort)),
},
},
fromRules: core_rules.FromRules{
Rules: map[core_rules.InboundListener]core_rules.Rules{
{
Address: "127.0.0.1",
Port: 80,
}: []*core_rules.Rule{},
},
},
expectedClusters: []string{"basic_without_defaults_inbound_cluster.golden.yaml"},
expectedListeners: []string{"basic_without_defaults_inbound_listener.golden.yaml"},
}),
Entry("outbound with defaults when http conf missing", sidecarTestCase{
resources: []core_xds.Resource{
{
Expand Down
Loading