Skip to content

Commit 2fbcbbe

Browse files
authored
Fix custom client tls ex (kube-rs#1619)
* Fix custom_client_tls example was not building on CI because it needs --all-features Signed-off-by: clux <[email protected]> * all features example build Signed-off-by: clux <[email protected]> * all features in right place Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
1 parent 4a63e81 commit 2fbcbbe

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
# Examples
7979
- name: Test examples
8080
if: matrix.os != 'windows-latest'
81-
run: cargo test -p kube-examples --examples -j6
81+
run: cargo test -p kube-examples --examples -j6 --all-features
8282

8383
doc:
8484
runs-on: ubuntu-latest

examples/custom_client_tls.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use hyper_util::rt::TokioExecutor;
33
// Must enable `rustls-tls` feature to run this.
44
// Run with `USE_RUSTLS=1` to pick rustls.
55
use k8s_openapi::api::core::v1::Pod;
6-
use tower::ServiceBuilder;
6+
use tower::{BoxError, ServiceBuilder};
77
use tracing::*;
88

99
use kube::{client::ConfigExt, Api, Client, Config, ResourceExt};
@@ -21,13 +21,15 @@ async fn main() -> anyhow::Result<()> {
2121
let service = ServiceBuilder::new()
2222
.layer(config.base_uri_layer())
2323
.option_layer(config.auth_layer()?)
24+
.map_err(BoxError::from)
2425
.service(hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(https));
2526
Client::new(service, config.default_namespace)
2627
} else {
2728
let https = config.rustls_https_connector()?;
2829
let service = ServiceBuilder::new()
2930
.layer(config.base_uri_layer())
3031
.option_layer(config.auth_layer()?)
32+
.map_err(BoxError::from)
3133
.service(hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(https));
3234
Client::new(service, config.default_namespace)
3335
};

0 commit comments

Comments
 (0)