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

Set a default write timeout #1314

Merged
merged 1 commit into from
Oct 27, 2023
Merged
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
7 changes: 4 additions & 3 deletions kube-client/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
root_cert: None,
connect_timeout: Some(DEFAULT_CONNECT_TIMEOUT),
read_timeout: Some(DEFAULT_READ_TIMEOUT),
write_timeout: None,
write_timeout: Some(DEFAULT_WRITE_TIMEOUT),

Check warning on line 173 in kube-client/src/config/mod.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/config/mod.rs#L173

Added line #L173 was not covered by tests
accept_invalid_certs: false,
auth_info: AuthInfo::default(),
proxy_url: None,
Expand Down Expand Up @@ -249,7 +249,7 @@
root_cert: Some(root_cert),
connect_timeout: Some(DEFAULT_CONNECT_TIMEOUT),
read_timeout: Some(DEFAULT_READ_TIMEOUT),
write_timeout: None,
write_timeout: Some(DEFAULT_WRITE_TIMEOUT),

Check warning on line 252 in kube-client/src/config/mod.rs

View check run for this annotation

Codecov / codecov/patch

kube-client/src/config/mod.rs#L252

Added line #L252 was not covered by tests
accept_invalid_certs: false,
auth_info: AuthInfo {
token_file: Some(incluster_config::token_file()),
Expand Down Expand Up @@ -309,7 +309,7 @@
root_cert,
connect_timeout: Some(DEFAULT_CONNECT_TIMEOUT),
read_timeout: Some(DEFAULT_READ_TIMEOUT),
write_timeout: None,
write_timeout: Some(DEFAULT_WRITE_TIMEOUT),
accept_invalid_certs,
proxy_url: loader.proxy_url()?,
auth_info: loader.user,
Expand Down Expand Up @@ -377,6 +377,7 @@
// https://github.com/kube-rs/kube/issues/146#issuecomment-590924397
const DEFAULT_CONNECT_TIMEOUT: Duration = Duration::from_secs(30);
const DEFAULT_READ_TIMEOUT: Duration = Duration::from_secs(295);
const DEFAULT_WRITE_TIMEOUT: Duration = Duration::from_secs(295);

// Expose raw config structs
pub use file_config::{
Expand Down
Loading