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

implement GEP-1742 timeouts in the policy controller #10975

Merged
merged 16 commits into from
Jun 2, 2023

Conversation

hawkw
Copy link
Contributor

@hawkw hawkw commented Jun 1, 2023

PR #10969 adds support for the GEP-1742 timeouts field to the
HTTPRoute CRD. This branch implements actual support for these fields in
the policy controller. The timeout fields are now read and used to set
the timeout fields added to the proxy-api in
linkerd/linkerd2-proxy-api#243.

In addition, I've added code to ensure that the timeout fields are
parsed correctly when a JSON manifest is deserialized. The current
implementation represents timeouts in the bindings as a Rust
std::time::Duration type. Duration does implement
serde::Deserialize and serde::Serialize, but its serialization
implementation attempts to (de)serialize it as a struct consisting of a
number of seconds and a number of subsecond nanoseconds. The timeout
fields are instead supposed to be represented as strings in the Go
standard library's time.ParseDuration format. Therefore, I've added a
newtype which wraps the Rust std::time::Duration and implements the
same parsing logic as Go. Eventually, I'd like to upstream the
implementation of this to kube-rs; see kube-rs/kube#1222 for details.

Depends on #10969
Depends on linkerd/linkerd2-proxy-api#243

Base automatically changed from alex/timeout-crds to main June 1, 2023 22:02
@hawkw hawkw force-pushed the eliza/client-policy-timeouts branch from c0ae001 to 9296492 Compare June 1, 2023 22:13
@hawkw hawkw marked this pull request as ready for review June 1, 2023 22:28
@hawkw hawkw requested a review from a team as a code owner June 1, 2023 22:28
policy-controller/grpc/src/outbound.rs Outdated Show resolved Hide resolved
policy-controller/grpc/src/outbound.rs Outdated Show resolved Hide resolved
policy-controller/grpc/src/outbound.rs Outdated Show resolved Hide resolved
policy-controller/core/src/outbound.rs Outdated Show resolved Hide resolved
@hawkw hawkw requested a review from adleong June 2, 2023 01:09
@hawkw hawkw requested a review from a team June 2, 2023 17:33
@hawkw hawkw merged commit ce97e07 into main Jun 2, 2023
@hawkw hawkw deleted the eliza/client-policy-timeouts branch June 2, 2023 18:32
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.

3 participants