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

Remove kube::Service #532

Merged
merged 2 commits into from
May 21, 2021
Merged

Remove kube::Service #532

merged 2 commits into from
May 21, 2021

Conversation

kazk
Copy link
Member

@kazk kazk commented May 21, 2021

kube::Service struct wasn't necessary to keep Client type parameter free. Not sure why I didn't see this :/

Just let kube::Client hold buffered BoxService like kube::Service did, allow converting kube::Config into kube::Client directly, and make kube::Client::new generic.

Allows creating kube::Client from Service<http::Request<hyper::Body>> with some constraints. All layers are private as before for now. But we can start thinking of how to expose them for users to customize.

let service = ServiceBuilder::new()
    .layer(auth_layer)
    .layer(tracing_layer)
    .service(http_client);
let client = Client::new(service);
let pods: Api<Pod> = Api::namespaced(client, "default");

kazk added 2 commits May 20, 2021 23:52
Allow creating `kube::Client` from `Service<http::Request<hyper::Body>>` with
some constraints.
@kazk kazk force-pushed the remove-kube-service branch from c8f1397 to 6ae744d Compare May 21, 2021 06:53
kube/src/client/mod.rs Show resolved Hide resolved
kube/src/client/mod.rs Show resolved Hide resolved
@clux clux merged commit 0d5a817 into kube-rs:master May 21, 2021
@kazk kazk deleted the remove-kube-service branch May 21, 2021 07:28
@clux
Copy link
Member

clux commented May 21, 2021

released this in 0.55.0

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.

2 participants