Skip to content

Make the decode function respect the timeout context

What type of PR is this?

/kind feature

What this PR does / why we need it:

It is possible to issue a list request that exceeds the duration set by the apiserver request-timeout flag. While the apiserver is decoding etcd's response, the request timeout is not enforced.

Which issue(s) this PR fixes:

Fixes #121267

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add the decoding of apiserver's list request respects the timeout context, 
and adds apiserver.latency.k8s.io/decode-response-object annotation to the audit log to record the decoding time

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

Merge request reports

Loading