diff --git a/Cargo.lock b/Cargo.lock index f90c9d2c..56c153d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -131,7 +131,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -159,9 +159,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.4.1" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9441c6b2fe128a7c2bf680a44c34d0df31ce09e5b7e401fcca3faa483dbc921" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" @@ -546,9 +546,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" +checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" dependencies = [ "libc", ] @@ -610,7 +610,7 @@ dependencies = [ [[package]] name = "curp" version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "async-stream", "async-trait", @@ -622,8 +622,8 @@ dependencies = [ "dashmap", "derive_builder", "engine", - "event-listener", - "flume", + "event-listener 2.5.3", + "flume 0.10.14", "futures", "indexmap 1.9.3", "itertools", @@ -642,13 +642,13 @@ dependencies = [ "tower", "tracing", "tracing-opentelemetry", - "utils 0.1.0 (git+https://github.com/xline-kv/Xline.git)", + "utils", ] [[package]] name = "curp-external-api" version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "async-trait", "engine", @@ -735,7 +735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown 0.14.1", + "hashbrown 0.14.2", "lock_api", "once_cell", "parking_lot_core", @@ -843,7 +843,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "engine" version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "async-trait", "bincode", @@ -895,6 +895,17 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "2.0.1" @@ -929,6 +940,18 @@ dependencies = [ "spin 0.9.8", ] +[[package]] +name = "flume" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "spin 0.9.8", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1041,9 +1064,9 @@ dependencies = [ [[package]] name = "garde" -version = "0.14.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc4e06c5b4a8fef3ad41939c6116ea06a0d93f647c6430154d924bf021c374" +checksum = "d959ef7bda0bda7cc0f6fbebfbac6202f810394f50e07059eeea8ec31e69e4b0" dependencies = [ "garde_derive", "once_cell", @@ -1052,9 +1075,9 @@ dependencies = [ [[package]] name = "garde_derive" -version = "0.14.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6699dea5b266ce9ca75ab4cbc5a7e98d5abfdf3197cecef5374a623023939acd" +checksum = "7e89f7fce035bb3a3718e23efff13709a0b21b694c4eae20a32e1a3e4e27c6a2" dependencies = [ "proc-macro2", "quote", @@ -1136,9 +1159,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" dependencies = [ "ahash 0.8.3", "allocator-api2", @@ -1246,7 +1269,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -1283,16 +1306,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows", + "windows-core", ] [[package]] @@ -1338,7 +1361,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown 0.14.2", ] [[package]] @@ -1534,7 +1557,7 @@ dependencies = [ "backoff", "derivative", "futures", - "hashbrown 0.14.1", + "hashbrown 0.14.2", "json-patch", "k8s-openapi", "kube-client", @@ -1612,9 +1635,9 @@ checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2084,6 +2107,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "384e52fd8fbd4cbe3c317e8216260c21a0f9134de108cea8a4dd4e7e152c472d" +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" version = "0.12.1" @@ -2096,13 +2125,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.4.1", "smallvec", "windows-targets", ] @@ -2446,6 +2475,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "regex" version = "1.10.2" @@ -2529,9 +2567,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.19" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ "bitflags 2.4.1", "errno", @@ -2877,9 +2915,9 @@ checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -2887,9 +2925,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", "windows-sys", @@ -2958,7 +2996,7 @@ checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", + "redox_syscall 0.3.5", "rustix", "windows-sys", ] @@ -2986,18 +3024,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -3093,7 +3131,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.4", + "socket2 0.5.5", "tokio-macros", "windows-sys", ] @@ -3195,7 +3233,19 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -3220,6 +3270,19 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.0.2", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + [[package]] name = "tonic" version = "0.9.2" @@ -3329,9 +3392,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.39" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2ef2af84856a50c1d430afce2fdded0a4ec7eda868db86409b4543df0797f9" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", @@ -3513,15 +3576,7 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "utils" version = "0.1.0" -dependencies = [ - "anyhow", - "uuid", -] - -[[package]] -name = "utils" -version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "clippy-utilities 0.2.0", "derive_builder", @@ -3540,9 +3595,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom", ] @@ -3688,10 +3743,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows" -version = "0.48.0" +name = "windows-core" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" dependencies = [ "windows-targets", ] @@ -3774,7 +3829,7 @@ dependencies = [ [[package]] name = "xline" version = "0.4.1" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "anyhow", "async-stream", @@ -3785,8 +3840,8 @@ dependencies = [ "crossbeam-skiplist", "curp", "engine", - "event-listener", - "flume", + "event-listener 2.5.3", + "flume 0.10.14", "futures", "getset", "hyper", @@ -3815,7 +3870,7 @@ dependencies = [ "tracing-appender", "tracing-opentelemetry", "tracing-subscriber", - "utils 0.1.0 (git+https://github.com/xline-kv/Xline.git)", + "utils", "uuid", "xlineapi", ] @@ -3823,7 +3878,7 @@ dependencies = [ [[package]] name = "xline-client" version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "async-stream", "clippy-utilities 0.1.0", @@ -3837,7 +3892,7 @@ dependencies = [ "pbkdf2", "thiserror", "tower", - "utils 0.1.0 (git+https://github.com/xline-kv/Xline.git)", + "utils", "xline", "xlineapi", ] @@ -3851,8 +3906,8 @@ dependencies = [ "axum", "clap 4.4.6", "clippy-utilities 0.2.0", - "event-listener", - "flume", + "event-listener 2.5.3", + "flume 0.11.0", "futures", "garde", "k8s-openapi", @@ -3862,11 +3917,11 @@ dependencies = [ "schemars", "serde", "serde_json", + "serde_yaml", "thiserror", "tokio", "tracing", "tracing-subscriber", - "utils 0.1.0", ] [[package]] @@ -3879,26 +3934,26 @@ dependencies = [ "bytes", "clap 4.4.6", "engine", - "event-listener", + "event-listener 3.0.0", "futures", "operator-api", "serde", "serde_json", "thiserror", "tokio", - "toml 0.7.8", + "toml 0.8.2", "tonic", "tonic-health", "tracing", "tracing-subscriber", - "utils 0.1.0", + "uuid", "xline-client", ] [[package]] name = "xlineapi" version = "0.1.0" -source = "git+https://github.com/xline-kv/Xline.git#6e9588157852816dd7e44935d8b0ae4edc5075d7" +source = "git+https://github.com/xline-kv/Xline.git#62cbe71a652f6e5db39d609a2c68e03ccd9dd2bf" dependencies = [ "curp-external-api", "madsim-etcd-client", diff --git a/operator-api/Cargo.toml b/operator-api/Cargo.toml index 82df28e1..cb3cd76c 100644 --- a/operator-api/Cargo.toml +++ b/operator-api/Cargo.toml @@ -13,6 +13,6 @@ keywords = ["operator", "API", "operator"] [dependencies] anyhow = "1.0.72" async-trait = "0.1.72" -k8s-openapi = { version = "0.18.0", features = ["v1_26", "schemars"] } -kube = { version = "0.83.0", features = ["runtime", "derive", "ws"] } +k8s-openapi = { version = "0.20.0", features = ["v1_28", "schemars"] } +kube = { version = "0.86.0", features = ["runtime", "derive", "ws"] } serde = { version = "1.0.130", features = ["derive"] } diff --git a/operator-k8s/Cargo.toml b/operator-k8s/Cargo.toml index 4655b144..ec5596c2 100644 --- a/operator-k8s/Cargo.toml +++ b/operator-k8s/Cargo.toml @@ -18,10 +18,10 @@ axum = "0.6.18" clap = { version = "4.3.4", features = ["derive"] } clippy-utilities = "0.2.0" event-listener = "2.5.3" -flume = "0.10.14" +flume = "0.11.0" futures = "0.3.28" -k8s-openapi = { version = "0.18.0", features = ["v1_26", "schemars"] } -kube = { version = "0.83.0", features = ["runtime", "derive"] } +k8s-openapi = { version = "0.20.0", features = ["v1_28", "schemars"] } +kube = { version = "0.86.0", features = ["runtime", "derive"] } operator-api = { path = "../operator-api" } prometheus = "0.13.3" schemars = "0.8.6" diff --git a/operator-k8s/src/controller/cluster/v1alpha1.rs b/operator-k8s/src/controller/cluster/v1alpha1.rs index 4765f8cc..292f6cb0 100644 --- a/operator-k8s/src/controller/cluster/v1alpha1.rs +++ b/operator-k8s/src/controller/cluster/v1alpha1.rs @@ -33,7 +33,7 @@ impl MetricsLabeled for kube::Error { Self::Service(_) => vec!["service error"], Self::FromUtf8(_) | Self::SerdeError(_) => vec!["encode/decode error"], Self::Auth(_) => vec!["authorization error"], - Self::OpensslTls(_) => vec!["tls error"], + Self::RustlsTls(_) => vec!["tls error"], Self::HyperError(_) | Self::HttpError(_) => vec!["http error"], _ => vec!["unknown"], } diff --git a/sidecar/Cargo.toml b/sidecar/Cargo.toml index c1f17009..22a221a9 100644 --- a/sidecar/Cargo.toml +++ b/sidecar/Cargo.toml @@ -18,7 +18,7 @@ axum = "0.6.18" bytes = "1.4.0" clap = { version = "4.3.4", features = ["derive"] } engine = { git = "https://github.com/xline-kv/Xline.git", package = "engine" } -event-listener = "2.5.3" +event-listener = "3.0.0" futures = "0.3.28" operator-api = { path = "../operator-api" } serde = { version = "1.0.130", features = ["derive"] } @@ -30,7 +30,7 @@ tokio = { version = "1.0", features = [ "macros", "net", ] } -toml = "0.7.4" +toml = "0.8.2" tonic = "0.9.2" tonic-health = "0.9.2" tracing = "0.1.37" diff --git a/sidecar/src/main.rs b/sidecar/src/main.rs index 256c9bb0..85d1b082 100644 --- a/sidecar/src/main.rs +++ b/sidecar/src/main.rs @@ -283,7 +283,7 @@ fn parse_backend(value: &str) -> Result { "pod" => pod_name = v.to_owned(), "container" => container_name = v.to_owned(), "namespace" => namespace = v.to_owned(), - _ => return Err(format!("k8s backend got unexpect argument {item}, expect one of 'pod', 'container', 'namespace'")), + _ => return Err(format!("k8s backend got unexpected argument {item}, expect one of 'pod', 'container', 'namespace'")), } } if pod_name.is_empty() || container_name.is_empty() || namespace.is_empty() {