feat: kube protocol support (#267)

This commit is contained in:
Christian Visintin
2024-07-17 11:59:30 +02:00
committed by GitHub
parent cf529c1678
commit f757336d75
50 changed files with 1863 additions and 418 deletions

464
Cargo.lock generated
View File

@@ -263,7 +263,7 @@ dependencies = [
"rust-ini",
"serde",
"thiserror",
"time 0.3.36",
"time",
"url",
]
@@ -299,9 +299,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "base64"
version = "0.21.2"
version = "0.21.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d"
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
[[package]]
name = "base64"
@@ -454,17 +454,17 @@ checksum = "77e53693616d3075149f4ead59bdeecd204ac6b8192d8969757601b74bddf00f"
[[package]]
name = "chrono"
version = "0.4.26"
version = "0.4.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"time 0.1.45",
"serde",
"wasm-bindgen",
"winapi 0.3.9",
"windows-targets 0.52.4",
]
[[package]]
@@ -591,7 +591,7 @@ dependencies = [
"bitflags 1.3.2",
"crossterm_winapi",
"libc",
"mio 0.8.8",
"mio 0.8.11",
"parking_lot 0.12.1",
"signal-hook",
"signal-hook-mio",
@@ -607,7 +607,7 @@ dependencies = [
"bitflags 2.4.2",
"crossterm_winapi",
"libc",
"mio 0.8.8",
"mio 0.8.11",
"parking_lot 0.12.1",
"signal-hook",
"signal-hook-mio",
@@ -689,6 +689,12 @@ dependencies = [
"parking_lot_core 0.9.8",
]
[[package]]
name = "data-encoding"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
name = "dbus"
version = "0.9.7"
@@ -1181,7 +1187,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427"
dependencies = [
"cfg-if 1.0.0",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
]
[[package]]
@@ -1230,6 +1236,30 @@ version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
[[package]]
name = "headers"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9"
dependencies = [
"base64 0.21.7",
"bytes",
"headers-core",
"http 1.1.0",
"httpdate",
"mime",
"sha1",
]
[[package]]
name = "headers-core"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4"
dependencies = [
"http 1.1.0",
]
[[package]]
name = "heck"
version = "0.4.1"
@@ -1299,9 +1329,9 @@ dependencies = [
[[package]]
name = "http"
version = "1.0.0"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea"
checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
"bytes",
"fnv",
@@ -1326,7 +1356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
dependencies = [
"bytes",
"http 1.0.0",
"http 1.1.0",
]
[[package]]
@@ -1337,7 +1367,7 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
dependencies = [
"bytes",
"futures-util",
"http 1.0.0",
"http 1.1.0",
"http-body 1.0.0",
"pin-project-lite",
]
@@ -1387,7 +1417,7 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
"http 1.0.0",
"http 1.1.0",
"http-body 1.0.0",
"httparse",
"itoa",
@@ -1397,6 +1427,26 @@ dependencies = [
"want",
]
[[package]]
name = "hyper-http-proxy"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d06dbdfbacf34d996c6fb540a71a684a7aae9056c71951163af8a8a4c07b9a4"
dependencies = [
"bytes",
"futures-util",
"headers",
"http 1.1.0",
"hyper 1.4.0",
"hyper-rustls",
"hyper-util",
"pin-project-lite",
"rustls-native-certs",
"tokio",
"tokio-rustls",
"tower-service",
]
[[package]]
name = "hyper-rustls"
version = "0.27.2"
@@ -1404,10 +1454,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155"
dependencies = [
"futures-util",
"http 1.0.0",
"http 1.1.0",
"hyper 1.4.0",
"hyper-util",
"log",
"rustls 0.23.11",
"rustls-native-certs",
"rustls-pki-types",
"tokio",
"tokio-rustls",
@@ -1415,6 +1467,19 @@ dependencies = [
"webpki-roots 0.26.3",
]
[[package]]
name = "hyper-timeout"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793"
dependencies = [
"hyper 1.4.0",
"hyper-util",
"pin-project-lite",
"tokio",
"tower-service",
]
[[package]]
name = "hyper-tls"
version = "0.5.0"
@@ -1437,7 +1502,7 @@ dependencies = [
"bytes",
"futures-channel",
"futures-util",
"http 1.0.0",
"http 1.1.0",
"http-body 1.0.0",
"hyper 1.4.0",
"pin-project-lite",
@@ -1618,6 +1683,34 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "jsonpath-rust"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19d8fe85bd70ff715f31ce8c739194b423d79811a19602115d611a3ec85d6200"
dependencies = [
"lazy_static",
"once_cell",
"pest",
"pest_derive",
"regex",
"serde_json",
"thiserror",
]
[[package]]
name = "k8s-openapi"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19501afb943ae5806548bc3ebd7f3374153ca057a38f480ef30adfde5ef09755"
dependencies = [
"base64 0.22.1",
"chrono",
"serde",
"serde-value",
"serde_json",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
@@ -1642,6 +1735,72 @@ dependencies = [
"winapi 0.3.9",
]
[[package]]
name = "kube"
version = "0.92.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "231c5a5392d9e2a9b0d923199760d3f1dd73b95288f2871d16c7c90ba4954506"
dependencies = [
"k8s-openapi",
"kube-client",
"kube-core",
]
[[package]]
name = "kube-client"
version = "0.92.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f4bf54135062ff60e2a0dfb3e7a9c8e931fc4a535b4d6bd561e0a1371321c61"
dependencies = [
"base64 0.22.1",
"bytes",
"chrono",
"either",
"futures",
"home",
"http 1.1.0",
"http-body 1.0.0",
"http-body-util",
"hyper 1.4.0",
"hyper-http-proxy",
"hyper-rustls",
"hyper-timeout",
"hyper-util",
"jsonpath-rust",
"k8s-openapi",
"kube-core",
"pem",
"rand",
"rustls 0.23.11",
"rustls-pemfile",
"secrecy",
"serde",
"serde_json",
"serde_yaml",
"thiserror",
"tokio",
"tokio-tungstenite",
"tokio-util",
"tower",
"tower-http",
"tracing",
]
[[package]]
name = "kube-core"
version = "0.92.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40fb9bd8141cbc0fe6b0d9112d371679b4cb607b45c31dd68d92e40864a12975"
dependencies = [
"chrono",
"form_urlencoded",
"http 1.1.0",
"k8s-openapi",
"serde",
"serde_json",
"thiserror",
]
[[package]]
name = "lazy-regex"
version = "2.5.0"
@@ -1789,7 +1948,7 @@ dependencies = [
"dirs-next",
"objc-foundation",
"objc_id",
"time 0.3.36",
"time",
]
[[package]]
@@ -1897,13 +2056,13 @@ dependencies = [
[[package]]
name = "mio"
version = "0.8.8"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"log",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
"windows-sys 0.48.0",
]
@@ -2237,6 +2396,15 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "ordered-float"
version = "2.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c"
dependencies = [
"num-traits",
]
[[package]]
name = "ordered-multimap"
version = "0.6.0"
@@ -2358,12 +2526,67 @@ dependencies = [
"thiserror",
]
[[package]]
name = "pem"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
dependencies = [
"base64 0.22.1",
"serde",
]
[[package]]
name = "percent-encoding"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95"
dependencies = [
"memchr",
"thiserror",
"ucd-trie",
]
[[package]]
name = "pest_derive"
version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a"
dependencies = [
"pest",
"pest_generator",
]
[[package]]
name = "pest_generator"
version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.52",
]
[[package]]
name = "pest_meta"
version = "2.7.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f"
dependencies = [
"once_cell",
"pest",
"sha2 0.10.7",
]
[[package]]
name = "pin-project"
version = "1.1.5"
@@ -2706,6 +2929,27 @@ dependencies = [
"users",
]
[[package]]
name = "remotefs-kube"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d6fea485470d4504bb9d7572e2fdee09866b3031331cc49e0eca2e2e31975d9"
dependencies = [
"chrono",
"futures-util",
"k8s-openapi",
"kube",
"lazy-regex 3.1.0",
"log",
"path-slash 0.2.1",
"remotefs",
"tar",
"tempfile",
"thiserror",
"tokio",
"tokio-util",
]
[[package]]
name = "remotefs-smb"
version = "0.2.0"
@@ -2744,7 +2988,7 @@ checksum = "e88503e1cd53067ab639150625718bb8d88e6bcd1e165205de0d941beca66bde"
dependencies = [
"bytes",
"bytestring",
"http 1.0.0",
"http 1.1.0",
"httpdate",
"indexmap 2.2.5",
"log",
@@ -2754,7 +2998,7 @@ dependencies = [
"remotefs",
"rustydav",
"thiserror",
"time 0.3.36",
"time",
]
[[package]]
@@ -2763,7 +3007,7 @@ version = "0.11.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55"
dependencies = [
"base64 0.21.2",
"base64 0.21.7",
"bytes",
"encoding_rs",
"futures-core",
@@ -2805,7 +3049,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"http 1.0.0",
"http 1.1.0",
"http-body 1.0.0",
"http-body-util",
"hyper 1.4.0",
@@ -2893,7 +3137,7 @@ dependencies = [
"attohttpc",
"aws-creds",
"aws-region",
"base64 0.21.2",
"base64 0.21.7",
"bytes",
"cfg-if 1.0.0",
"hex",
@@ -2909,7 +3153,7 @@ dependencies = [
"serde_json",
"sha2 0.10.7",
"thiserror",
"time 0.3.36",
"time",
"url",
]
@@ -2966,6 +3210,7 @@ version = "0.23.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0"
dependencies = [
"log",
"once_cell",
"ring",
"rustls-pki-types",
@@ -2974,6 +3219,19 @@ dependencies = [
"zeroize",
]
[[package]]
name = "rustls-native-certs"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba"
dependencies = [
"openssl-probe",
"rustls-pemfile",
"rustls-pki-types",
"schannel",
"security-framework",
]
[[package]]
name = "rustls-pemfile"
version = "2.1.2"
@@ -3066,6 +3324,16 @@ dependencies = [
"untrusted",
]
[[package]]
name = "secrecy"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e"
dependencies = [
"serde",
"zeroize",
]
[[package]]
name = "secret-service"
version = "3.0.1"
@@ -3158,6 +3426,16 @@ dependencies = [
"serde_derive",
]
[[package]]
name = "serde-value"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
dependencies = [
"ordered-float",
"serde",
]
[[package]]
name = "serde_derive"
version = "1.0.197"
@@ -3212,6 +3490,19 @@ dependencies = [
"serde",
]
[[package]]
name = "serde_yaml"
version = "0.9.34+deprecated"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
dependencies = [
"indexmap 2.2.5",
"itoa",
"ryu",
"serde",
"unsafe-libyaml",
]
[[package]]
name = "serial_test"
version = "3.0.0"
@@ -3289,7 +3580,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
dependencies = [
"libc",
"mio 0.8.8",
"mio 0.8.11",
"signal-hook",
]
@@ -3326,7 +3617,7 @@ checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369"
dependencies = [
"log",
"termcolor",
"time 0.3.36",
"time",
]
[[package]]
@@ -3531,7 +3822,7 @@ dependencies = [
[[package]]
name = "termscp"
version = "0.13.0"
version = "0.14.0"
dependencies = [
"argh",
"bitflags 2.4.2",
@@ -3557,6 +3848,7 @@ dependencies = [
"remotefs",
"remotefs-aws-s3",
"remotefs-ftp",
"remotefs-kube",
"remotefs-smb",
"remotefs-ssh",
"remotefs-webdav",
@@ -3568,6 +3860,7 @@ dependencies = [
"ssh2-config",
"tempfile",
"thiserror",
"tokio",
"toml",
"tui-realm-stdlib",
"tuirealm",
@@ -3620,17 +3913,6 @@ dependencies = [
"digest 0.9.0",
]
[[package]]
name = "time"
version = "0.1.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi 0.3.9",
]
[[package]]
name = "time"
version = "0.3.36"
@@ -3690,21 +3972,33 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.29.1"
version = "1.38.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da"
checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df"
dependencies = [
"autocfg",
"backtrace",
"bytes",
"libc",
"mio 0.8.8",
"mio 0.8.11",
"num_cpus",
"pin-project-lite",
"socket2 0.4.9",
"signal-hook-registry",
"socket2 0.5.7",
"tokio-macros",
"windows-sys 0.48.0",
]
[[package]]
name = "tokio-macros"
version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.52",
]
[[package]]
name = "tokio-native-tls"
version = "0.3.1"
@@ -3726,6 +4020,18 @@ dependencies = [
"tokio",
]
[[package]]
name = "tokio-tungstenite"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd"
dependencies = [
"futures-util",
"log",
"tokio",
"tungstenite",
]
[[package]]
name = "tokio-util"
version = "0.7.8"
@@ -3796,8 +4102,29 @@ dependencies = [
"pin-project",
"pin-project-lite",
"tokio",
"tokio-util",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "tower-http"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5"
dependencies = [
"base64 0.21.7",
"bitflags 2.4.2",
"bytes",
"http 1.1.0",
"http-body 1.0.0",
"http-body-util",
"mime",
"pin-project-lite",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
@@ -3819,6 +4146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
dependencies = [
"cfg-if 1.0.0",
"log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -3900,12 +4228,36 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "tungstenite"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8"
dependencies = [
"byteorder",
"bytes",
"data-encoding",
"http 1.1.0",
"httparse",
"log",
"rand",
"sha1",
"thiserror",
"utf-8",
]
[[package]]
name = "typenum"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"
[[package]]
name = "ucd-trie"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9"
[[package]]
name = "uds_windows"
version = "1.0.2"
@@ -3959,6 +4311,12 @@ version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
[[package]]
name = "unsafe-libyaml"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
[[package]]
name = "untrusted"
version = "0.9.0"
@@ -3992,6 +4350,12 @@ dependencies = [
"log",
]
[[package]]
name = "utf-8"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]
name = "vcpkg"
version = "0.2.15"
@@ -4035,12 +4399,6 @@ dependencies = [
"try-lock",
]
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
@@ -4635,7 +4993,7 @@ dependencies = [
"indexmap 2.2.5",
"memchr",
"thiserror",
"time 0.3.36",
"time",
"zopfli",
]