From 71657cf1e1a4d847537ecce9d15362b353519d75 Mon Sep 17 00:00:00 2001 From: yoogo Date: Wed, 24 Apr 2024 10:50:20 +0800 Subject: [PATCH] feat: support k8s-openapi feautes --- Cargo.lock | 2 +- Cargo.toml | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3ddb181..51cd306 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1618,7 +1618,7 @@ dependencies = [ [[package]] name = "tonic-lb" -version = "0.0.1" +version = "0.0.2" dependencies = [ "anyhow", "futures", diff --git a/Cargo.toml b/Cargo.toml index dbbc502..c00dd87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "tonic-lb" -version = "0.0.1" +version = "0.0.2" edition = "2021" description = "A Grpc name resolver for tonic" license = "MIT" homepage = "https://github.com/yoogoc/tonic-lb" repository = "https://github.com/yoogoc/tonic-lb" -keywords = ["tonic", "loadbalance", "kube", "kubernetes"] +keywords = ["tonic", "loadbalance", "kube", "kubernetes", "async", "api", "web"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -15,7 +15,18 @@ kube = { version = "0.90.0", features = ["runtime", "client", "derive"] } tokio = "1.37.0" tonic = "0.11.0" tower = "0.4.13" -k8s-openapi = { version = "0.21.1", features = ["latest"] } +k8s-openapi = { version = "0.21.1", default-features = false } futures = "0.3.30" thiserror = "1.0.58" anyhow = "1.0.82" + +[features] +default = ["kube-latest"] +kube-earliest=["k8s-openapi/earliest"] +kube-latest=["k8s-openapi/latest"] +kube-v1_24=["k8s-openapi/v1_24"] +kube-v1_25=["k8s-openapi/v1_25"] +kube-v1_26=["k8s-openapi/v1_26"] +kube-v1_27=["k8s-openapi/v1_27"] +kube-v1_28=["k8s-openapi/v1_28"] +kube-v1_29=["k8s-openapi/v1_29"]