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

feat(kuma-cp) timeouts #1554

Merged
merged 15 commits into from
Feb 22, 2021
Merged

feat(kuma-cp) timeouts #1554

merged 15 commits into from
Feb 22, 2021

Conversation

lobkovilya
Copy link
Contributor

@lobkovilya lobkovilya commented Feb 12, 2021

Summary

Current PR introduces a new policy Timeout. It's created according to the proposal.

TODO in the scope of this PR

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>

# Conflicts:
#	app/kumactl/pkg/install/k8s/control-plane/helmtemplates_vfsdata.go
#	go.sum
#	pkg/plugins/resources/k8s/native/go.sum
#	pkg/xds/generator/direct_access_proxy_generator_test.go
#	pkg/xds/generator/inbound_proxy_generator_test.go
#	pkg/xds/generator/ingress_generator_test.go
#	pkg/xds/generator/outbound_proxy_generator_test.go
#	pkg/xds/generator/proxy_template_profile_source_test.go
#	pkg/xds/generator/proxy_template_test.go
#	pkg/xds/generator/testdata/admin/01.envoy-config.golden.yaml
#	pkg/xds/generator/testdata/direct-access/03.envoy-config.golden.yaml
#	pkg/xds/generator/testdata/direct-access/04.envoy-config.golden.yaml
#	pkg/xds/generator/testdata/inbound-proxy/3-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/inbound-proxy/4-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/ingress/01.envoy.golden.yaml
#	pkg/xds/generator/testdata/ingress/03.envoy.golden.yaml
#	pkg/xds/generator/testdata/ingress/04.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/05.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/06.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/cluster-dots.envoy.golden.yaml
#	pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/template-proxy/1-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/tracing/zipkin.envoy-config.golden.yaml
#	pkg/xds/generator/tracing_generator_test.go
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya marked this pull request as ready for review February 15, 2021 08:52
@lobkovilya lobkovilya requested a review from a team as a code owner February 15, 2021 08:52
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Will we also have E2E test for this?
Idea: Inject request delays via Fault Injection and see HTTP timeouts.

api/mesh/v1alpha1/timeout_helpers.go Show resolved Hide resolved
api/mesh/v1alpha1/timeout_helpers.go Outdated Show resolved Hide resolved
pkg/core/resources/apis/mesh/timeout_validator.go Outdated Show resolved Hide resolved
pkg/defaults/mesh/mesh.go Outdated Show resolved Hide resolved
RequestTimeout: durationpb.New(15 * time.Second),
},
Grpc: &mesh_proto.Timeout_Conf_Grpc{
StreamIdleTimeout: durationpb.New(5 * time.Minute),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional that max_stream_duration is missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, by default max_stream_duration is not set in the Envoy, so I think it's okay to skip it for the default Timeout policy

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya
Copy link
Contributor Author

@jakubdyszkiewicz that's a really nice idea to test it with FaultInjection, I had a plan to do it in a separate PR to not overload this PR

Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>

# Conflicts:
#	pkg/plugins/resources/k8s/native/go.sum
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>

# Conflicts:
#	app/kumactl/pkg/install/k8s/control-plane/helmtemplates_vfsdata.go
#	pkg/xds/generator/testdata/direct-access/03.envoy-config.golden.yaml
#	pkg/xds/generator/testdata/direct-access/04.envoy-config.golden.yaml
#	pkg/xds/generator/testdata/ingress/01.envoy.golden.yaml
#	pkg/xds/generator/testdata/ingress/03.envoy.golden.yaml
#	pkg/xds/generator/testdata/ingress/04.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/03.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/04.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/05.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/06.envoy.golden.yaml
#	pkg/xds/generator/testdata/outbound-proxy/cluster-dots.envoy.golden.yaml
#	pkg/xds/generator/testdata/profile-source/1-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/2-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/3-envoy-config.golden.yaml
#	pkg/xds/generator/testdata/profile-source/4-envoy-config.golden.yaml
#	pkg/xds/generator/transparent_proxy_generator_test.go
Signed-off-by: Ilya Lobkov <ilya.lobkov@konghq.com>
@lobkovilya lobkovilya merged commit 2baef1d into master Feb 22, 2021
@lobkovilya lobkovilya deleted the feat/timeouts branch February 22, 2021 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants