├── .cargo └── config.toml ├── .gitignore ├── .vscode └── settings.json ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE ├── README.md ├── build.sh ├── crdgen.sh ├── src ├── controller.rs ├── crdgen.rs ├── lib.rs └── main.rs ├── test-workloads.yaml └── yaml ├── crd.yaml └── operator.yaml /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = ["x86_64-unknown-linux-musl"] 3 | 4 | [target.x86_64-unknown-linux-musl] 5 | rustflags = ["-C", "target-feature=+crt-static"] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "rust-analyzer.linkedProjects": [ 3 | "./Cargo.toml", 4 | "./Cargo.toml", 5 | "./Cargo.toml", 6 | "./Cargo.toml", 7 | "./Cargo.toml" 8 | ], 9 | "rust-analyzer.showUnlinkedFileNotification": false 10 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ahash" 7 | version = "0.8.3" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" 10 | dependencies = [ 11 | "cfg-if", 12 | "getrandom", 13 | "once_cell", 14 | "version_check", 15 | ] 16 | 17 | [[package]] 18 | name = "android_system_properties" 19 | version = "0.1.5" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 22 | dependencies = [ 23 | "libc", 24 | ] 25 | 26 | [[package]] 27 | name = "anyhow" 28 | version = "1.0.70" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" 31 | 32 | [[package]] 33 | name = "async-trait" 34 | version = "0.1.68" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" 37 | dependencies = [ 38 | "proc-macro2", 39 | "quote", 40 | "syn 2.0.15", 41 | ] 42 | 43 | [[package]] 44 | name = "autocfg" 45 | version = "1.1.0" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 48 | 49 | [[package]] 50 | name = "backoff" 51 | version = "0.4.0" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" 54 | dependencies = [ 55 | "getrandom", 56 | "instant", 57 | "rand", 58 | ] 59 | 60 | [[package]] 61 | name = "base64" 62 | version = "0.13.1" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 65 | 66 | [[package]] 67 | name = "base64" 68 | version = "0.20.0" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" 71 | 72 | [[package]] 73 | name = "base64" 74 | version = "0.21.0" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 77 | 78 | [[package]] 79 | name = "bitflags" 80 | version = "1.3.2" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 83 | 84 | [[package]] 85 | name = "bumpalo" 86 | version = "3.12.0" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" 89 | 90 | [[package]] 91 | name = "bytes" 92 | version = "1.4.0" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" 95 | 96 | [[package]] 97 | name = "cc" 98 | version = "1.0.79" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" 101 | 102 | [[package]] 103 | name = "cfg-if" 104 | version = "1.0.0" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 107 | 108 | [[package]] 109 | name = "chrono" 110 | version = "0.4.24" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" 113 | dependencies = [ 114 | "iana-time-zone", 115 | "num-integer", 116 | "num-traits", 117 | "serde", 118 | "winapi", 119 | ] 120 | 121 | [[package]] 122 | name = "codespan-reporting" 123 | version = "0.11.1" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 126 | dependencies = [ 127 | "termcolor", 128 | "unicode-width", 129 | ] 130 | 131 | [[package]] 132 | name = "core-foundation-sys" 133 | version = "0.8.4" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" 136 | 137 | [[package]] 138 | name = "cxx" 139 | version = "1.0.94" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" 142 | dependencies = [ 143 | "cc", 144 | "cxxbridge-flags", 145 | "cxxbridge-macro", 146 | "link-cplusplus", 147 | ] 148 | 149 | [[package]] 150 | name = "cxx-build" 151 | version = "1.0.94" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" 154 | dependencies = [ 155 | "cc", 156 | "codespan-reporting", 157 | "once_cell", 158 | "proc-macro2", 159 | "quote", 160 | "scratch", 161 | "syn 2.0.15", 162 | ] 163 | 164 | [[package]] 165 | name = "cxxbridge-flags" 166 | version = "1.0.94" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" 169 | 170 | [[package]] 171 | name = "cxxbridge-macro" 172 | version = "1.0.94" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" 175 | dependencies = [ 176 | "proc-macro2", 177 | "quote", 178 | "syn 2.0.15", 179 | ] 180 | 181 | [[package]] 182 | name = "darling" 183 | version = "0.14.4" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" 186 | dependencies = [ 187 | "darling_core", 188 | "darling_macro", 189 | ] 190 | 191 | [[package]] 192 | name = "darling_core" 193 | version = "0.14.4" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" 196 | dependencies = [ 197 | "fnv", 198 | "ident_case", 199 | "proc-macro2", 200 | "quote", 201 | "strsim", 202 | "syn 1.0.109", 203 | ] 204 | 205 | [[package]] 206 | name = "darling_macro" 207 | version = "0.14.4" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" 210 | dependencies = [ 211 | "darling_core", 212 | "quote", 213 | "syn 1.0.109", 214 | ] 215 | 216 | [[package]] 217 | name = "derivative" 218 | version = "2.2.0" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 221 | dependencies = [ 222 | "proc-macro2", 223 | "quote", 224 | "syn 1.0.109", 225 | ] 226 | 227 | [[package]] 228 | name = "dirs-next" 229 | version = "2.0.0" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 232 | dependencies = [ 233 | "cfg-if", 234 | "dirs-sys-next", 235 | ] 236 | 237 | [[package]] 238 | name = "dirs-sys-next" 239 | version = "0.1.2" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 242 | dependencies = [ 243 | "libc", 244 | "redox_users", 245 | "winapi", 246 | ] 247 | 248 | [[package]] 249 | name = "dyn-clone" 250 | version = "1.0.11" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" 253 | 254 | [[package]] 255 | name = "either" 256 | version = "1.8.1" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" 259 | 260 | [[package]] 261 | name = "fnv" 262 | version = "1.0.7" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 265 | 266 | [[package]] 267 | name = "foreign-types" 268 | version = "0.3.2" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 271 | dependencies = [ 272 | "foreign-types-shared", 273 | ] 274 | 275 | [[package]] 276 | name = "foreign-types-shared" 277 | version = "0.1.1" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 280 | 281 | [[package]] 282 | name = "form_urlencoded" 283 | version = "1.1.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" 286 | dependencies = [ 287 | "percent-encoding", 288 | ] 289 | 290 | [[package]] 291 | name = "futures" 292 | version = "0.3.28" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" 295 | dependencies = [ 296 | "futures-channel", 297 | "futures-core", 298 | "futures-executor", 299 | "futures-io", 300 | "futures-sink", 301 | "futures-task", 302 | "futures-util", 303 | ] 304 | 305 | [[package]] 306 | name = "futures-channel" 307 | version = "0.3.28" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" 310 | dependencies = [ 311 | "futures-core", 312 | "futures-sink", 313 | ] 314 | 315 | [[package]] 316 | name = "futures-core" 317 | version = "0.3.28" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" 320 | 321 | [[package]] 322 | name = "futures-executor" 323 | version = "0.3.28" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" 326 | dependencies = [ 327 | "futures-core", 328 | "futures-task", 329 | "futures-util", 330 | ] 331 | 332 | [[package]] 333 | name = "futures-io" 334 | version = "0.3.28" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" 337 | 338 | [[package]] 339 | name = "futures-macro" 340 | version = "0.3.28" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" 343 | dependencies = [ 344 | "proc-macro2", 345 | "quote", 346 | "syn 2.0.15", 347 | ] 348 | 349 | [[package]] 350 | name = "futures-sink" 351 | version = "0.3.28" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" 354 | 355 | [[package]] 356 | name = "futures-task" 357 | version = "0.3.28" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" 360 | 361 | [[package]] 362 | name = "futures-util" 363 | version = "0.3.28" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" 366 | dependencies = [ 367 | "futures-channel", 368 | "futures-core", 369 | "futures-io", 370 | "futures-macro", 371 | "futures-sink", 372 | "futures-task", 373 | "memchr", 374 | "pin-project-lite", 375 | "pin-utils", 376 | "slab", 377 | ] 378 | 379 | [[package]] 380 | name = "getrandom" 381 | version = "0.2.9" 382 | source = "registry+https://github.com/rust-lang/crates.io-index" 383 | checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" 384 | dependencies = [ 385 | "cfg-if", 386 | "libc", 387 | "wasi", 388 | ] 389 | 390 | [[package]] 391 | name = "hashbrown" 392 | version = "0.12.3" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 395 | 396 | [[package]] 397 | name = "hermit-abi" 398 | version = "0.2.6" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" 401 | dependencies = [ 402 | "libc", 403 | ] 404 | 405 | [[package]] 406 | name = "http" 407 | version = "0.2.9" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 410 | dependencies = [ 411 | "bytes", 412 | "fnv", 413 | "itoa", 414 | ] 415 | 416 | [[package]] 417 | name = "http-body" 418 | version = "0.4.5" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 421 | dependencies = [ 422 | "bytes", 423 | "http", 424 | "pin-project-lite", 425 | ] 426 | 427 | [[package]] 428 | name = "http-range-header" 429 | version = "0.3.0" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" 432 | 433 | [[package]] 434 | name = "httparse" 435 | version = "1.8.0" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 438 | 439 | [[package]] 440 | name = "httpdate" 441 | version = "1.0.2" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 444 | 445 | [[package]] 446 | name = "hyper" 447 | version = "0.14.26" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" 450 | dependencies = [ 451 | "bytes", 452 | "futures-channel", 453 | "futures-core", 454 | "futures-util", 455 | "http", 456 | "http-body", 457 | "httparse", 458 | "httpdate", 459 | "itoa", 460 | "pin-project-lite", 461 | "socket2", 462 | "tokio", 463 | "tower-service", 464 | "tracing", 465 | "want", 466 | ] 467 | 468 | [[package]] 469 | name = "hyper-openssl" 470 | version = "0.9.2" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "d6ee5d7a8f718585d1c3c61dfde28ef5b0bb14734b4db13f5ada856cdc6c612b" 473 | dependencies = [ 474 | "http", 475 | "hyper", 476 | "linked_hash_set", 477 | "once_cell", 478 | "openssl", 479 | "openssl-sys", 480 | "parking_lot", 481 | "tokio", 482 | "tokio-openssl", 483 | "tower-layer", 484 | ] 485 | 486 | [[package]] 487 | name = "hyper-timeout" 488 | version = "0.4.1" 489 | source = "registry+https://github.com/rust-lang/crates.io-index" 490 | checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" 491 | dependencies = [ 492 | "hyper", 493 | "pin-project-lite", 494 | "tokio", 495 | "tokio-io-timeout", 496 | ] 497 | 498 | [[package]] 499 | name = "iana-time-zone" 500 | version = "0.1.56" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" 503 | dependencies = [ 504 | "android_system_properties", 505 | "core-foundation-sys", 506 | "iana-time-zone-haiku", 507 | "js-sys", 508 | "wasm-bindgen", 509 | "windows", 510 | ] 511 | 512 | [[package]] 513 | name = "iana-time-zone-haiku" 514 | version = "0.1.1" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 517 | dependencies = [ 518 | "cxx", 519 | "cxx-build", 520 | ] 521 | 522 | [[package]] 523 | name = "ident_case" 524 | version = "1.0.1" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 527 | 528 | [[package]] 529 | name = "idna" 530 | version = "0.3.0" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" 533 | dependencies = [ 534 | "unicode-bidi", 535 | "unicode-normalization", 536 | ] 537 | 538 | [[package]] 539 | name = "indexmap" 540 | version = "1.9.3" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 543 | dependencies = [ 544 | "autocfg", 545 | "hashbrown", 546 | ] 547 | 548 | [[package]] 549 | name = "instant" 550 | version = "0.1.12" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 553 | dependencies = [ 554 | "cfg-if", 555 | ] 556 | 557 | [[package]] 558 | name = "itoa" 559 | version = "1.0.6" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 562 | 563 | [[package]] 564 | name = "js-sys" 565 | version = "0.3.61" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" 568 | dependencies = [ 569 | "wasm-bindgen", 570 | ] 571 | 572 | [[package]] 573 | name = "json-patch" 574 | version = "1.0.0" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" 577 | dependencies = [ 578 | "serde", 579 | "serde_json", 580 | "thiserror", 581 | "treediff", 582 | ] 583 | 584 | [[package]] 585 | name = "jsonpath_lib" 586 | version = "0.3.0" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" 589 | dependencies = [ 590 | "log", 591 | "serde", 592 | "serde_json", 593 | ] 594 | 595 | [[package]] 596 | name = "k8s-openapi" 597 | version = "0.18.0" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | checksum = "cd990069640f9db34b3b0f7a1afc62a05ffaa3be9b66aa3c313f58346df7f788" 600 | dependencies = [ 601 | "base64 0.21.0", 602 | "bytes", 603 | "chrono", 604 | "http", 605 | "percent-encoding", 606 | "serde", 607 | "serde-value", 608 | "serde_json", 609 | "url", 610 | ] 611 | 612 | [[package]] 613 | name = "kube" 614 | version = "0.82.1" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "7be64c88eeaeaeecf001614b67b144e784d836b5cb38f95851ae05b9695ccb55" 617 | dependencies = [ 618 | "k8s-openapi", 619 | "kube-client", 620 | "kube-core", 621 | "kube-derive", 622 | "kube-runtime", 623 | ] 624 | 625 | [[package]] 626 | name = "kube-client" 627 | version = "0.82.1" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "cf11f416b25014b1cc27446371d004288c9d3485d2ff79960165eafb6a49df9e" 630 | dependencies = [ 631 | "base64 0.20.0", 632 | "bytes", 633 | "chrono", 634 | "dirs-next", 635 | "either", 636 | "futures", 637 | "http", 638 | "http-body", 639 | "hyper", 640 | "hyper-openssl", 641 | "hyper-timeout", 642 | "jsonpath_lib", 643 | "k8s-openapi", 644 | "kube-core", 645 | "openssl", 646 | "pem", 647 | "pin-project", 648 | "secrecy", 649 | "serde", 650 | "serde_json", 651 | "serde_yaml", 652 | "thiserror", 653 | "tokio", 654 | "tokio-util", 655 | "tower", 656 | "tower-http", 657 | "tracing", 658 | ] 659 | 660 | [[package]] 661 | name = "kube-core" 662 | version = "0.82.1" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "65d6f01c2cd4370d80936f373dbbd2fceac4a6fb6f7054a86cea107ed3e8de2b" 665 | dependencies = [ 666 | "chrono", 667 | "form_urlencoded", 668 | "http", 669 | "json-patch", 670 | "k8s-openapi", 671 | "once_cell", 672 | "schemars", 673 | "serde", 674 | "serde_json", 675 | "thiserror", 676 | ] 677 | 678 | [[package]] 679 | name = "kube-derive" 680 | version = "0.82.1" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "21316bcdbc045e4f8f251ddf0134f7135fc6769ad77a87166ba466a4f620e887" 683 | dependencies = [ 684 | "darling", 685 | "proc-macro2", 686 | "quote", 687 | "serde_json", 688 | "syn 1.0.109", 689 | ] 690 | 691 | [[package]] 692 | name = "kube-runtime" 693 | version = "0.82.1" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "52c2f09b3dafcf0d22120c234be4db3172cb82243670be8b4a40b8d5f28dbe1d" 696 | dependencies = [ 697 | "ahash", 698 | "async-trait", 699 | "backoff", 700 | "derivative", 701 | "futures", 702 | "json-patch", 703 | "k8s-openapi", 704 | "kube-client", 705 | "parking_lot", 706 | "pin-project", 707 | "serde", 708 | "serde_json", 709 | "smallvec", 710 | "thiserror", 711 | "tokio", 712 | "tokio-util", 713 | "tracing", 714 | ] 715 | 716 | [[package]] 717 | name = "libc" 718 | version = "0.2.141" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" 721 | 722 | [[package]] 723 | name = "link-cplusplus" 724 | version = "1.0.8" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 727 | dependencies = [ 728 | "cc", 729 | ] 730 | 731 | [[package]] 732 | name = "linked-hash-map" 733 | version = "0.5.6" 734 | source = "registry+https://github.com/rust-lang/crates.io-index" 735 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 736 | 737 | [[package]] 738 | name = "linked_hash_set" 739 | version = "0.1.4" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588" 742 | dependencies = [ 743 | "linked-hash-map", 744 | ] 745 | 746 | [[package]] 747 | name = "lock_api" 748 | version = "0.4.9" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" 751 | dependencies = [ 752 | "autocfg", 753 | "scopeguard", 754 | ] 755 | 756 | [[package]] 757 | name = "log" 758 | version = "0.4.17" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 761 | dependencies = [ 762 | "cfg-if", 763 | ] 764 | 765 | [[package]] 766 | name = "memchr" 767 | version = "2.5.0" 768 | source = "registry+https://github.com/rust-lang/crates.io-index" 769 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 770 | 771 | [[package]] 772 | name = "mime" 773 | version = "0.3.17" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 776 | 777 | [[package]] 778 | name = "mio" 779 | version = "0.8.6" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 782 | dependencies = [ 783 | "libc", 784 | "log", 785 | "wasi", 786 | "windows-sys", 787 | ] 788 | 789 | [[package]] 790 | name = "num-integer" 791 | version = "0.1.45" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 794 | dependencies = [ 795 | "autocfg", 796 | "num-traits", 797 | ] 798 | 799 | [[package]] 800 | name = "num-traits" 801 | version = "0.2.15" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 804 | dependencies = [ 805 | "autocfg", 806 | ] 807 | 808 | [[package]] 809 | name = "num_cpus" 810 | version = "1.15.0" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" 813 | dependencies = [ 814 | "hermit-abi", 815 | "libc", 816 | ] 817 | 818 | [[package]] 819 | name = "once_cell" 820 | version = "1.17.1" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 823 | 824 | [[package]] 825 | name = "openssl" 826 | version = "0.10.50" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" 829 | dependencies = [ 830 | "bitflags", 831 | "cfg-if", 832 | "foreign-types", 833 | "libc", 834 | "once_cell", 835 | "openssl-macros", 836 | "openssl-sys", 837 | ] 838 | 839 | [[package]] 840 | name = "openssl-macros" 841 | version = "0.1.1" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 844 | dependencies = [ 845 | "proc-macro2", 846 | "quote", 847 | "syn 2.0.15", 848 | ] 849 | 850 | [[package]] 851 | name = "openssl-src" 852 | version = "111.25.2+1.1.1t" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | checksum = "320708a054ad9b3bf314688b5db87cf4d6683d64cfc835e2337924ae62bf4431" 855 | dependencies = [ 856 | "cc", 857 | ] 858 | 859 | [[package]] 860 | name = "openssl-sys" 861 | version = "0.9.85" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" 864 | dependencies = [ 865 | "cc", 866 | "libc", 867 | "openssl-src", 868 | "pkg-config", 869 | "vcpkg", 870 | ] 871 | 872 | [[package]] 873 | name = "operator-rs" 874 | version = "0.1.0" 875 | dependencies = [ 876 | "anyhow", 877 | "futures", 878 | "k8s-openapi", 879 | "kube", 880 | "openssl", 881 | "rustls", 882 | "schemars", 883 | "serde", 884 | "serde_json", 885 | "serde_yaml", 886 | "thiserror", 887 | "tokio", 888 | ] 889 | 890 | [[package]] 891 | name = "ordered-float" 892 | version = "2.10.0" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" 895 | dependencies = [ 896 | "num-traits", 897 | ] 898 | 899 | [[package]] 900 | name = "parking_lot" 901 | version = "0.12.1" 902 | source = "registry+https://github.com/rust-lang/crates.io-index" 903 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 904 | dependencies = [ 905 | "lock_api", 906 | "parking_lot_core", 907 | ] 908 | 909 | [[package]] 910 | name = "parking_lot_core" 911 | version = "0.9.7" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 914 | dependencies = [ 915 | "cfg-if", 916 | "libc", 917 | "redox_syscall", 918 | "smallvec", 919 | "windows-sys", 920 | ] 921 | 922 | [[package]] 923 | name = "pem" 924 | version = "1.1.1" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" 927 | dependencies = [ 928 | "base64 0.13.1", 929 | ] 930 | 931 | [[package]] 932 | name = "percent-encoding" 933 | version = "2.2.0" 934 | source = "registry+https://github.com/rust-lang/crates.io-index" 935 | checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" 936 | 937 | [[package]] 938 | name = "pin-project" 939 | version = "1.0.12" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" 942 | dependencies = [ 943 | "pin-project-internal", 944 | ] 945 | 946 | [[package]] 947 | name = "pin-project-internal" 948 | version = "1.0.12" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" 951 | dependencies = [ 952 | "proc-macro2", 953 | "quote", 954 | "syn 1.0.109", 955 | ] 956 | 957 | [[package]] 958 | name = "pin-project-lite" 959 | version = "0.2.9" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 962 | 963 | [[package]] 964 | name = "pin-utils" 965 | version = "0.1.0" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 968 | 969 | [[package]] 970 | name = "pkg-config" 971 | version = "0.3.26" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" 974 | 975 | [[package]] 976 | name = "ppv-lite86" 977 | version = "0.2.17" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 980 | 981 | [[package]] 982 | name = "proc-macro2" 983 | version = "1.0.56" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 986 | dependencies = [ 987 | "unicode-ident", 988 | ] 989 | 990 | [[package]] 991 | name = "quote" 992 | version = "1.0.26" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 995 | dependencies = [ 996 | "proc-macro2", 997 | ] 998 | 999 | [[package]] 1000 | name = "rand" 1001 | version = "0.8.5" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1004 | dependencies = [ 1005 | "libc", 1006 | "rand_chacha", 1007 | "rand_core", 1008 | ] 1009 | 1010 | [[package]] 1011 | name = "rand_chacha" 1012 | version = "0.3.1" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1015 | dependencies = [ 1016 | "ppv-lite86", 1017 | "rand_core", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "rand_core" 1022 | version = "0.6.4" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1025 | dependencies = [ 1026 | "getrandom", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "redox_syscall" 1031 | version = "0.2.16" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1034 | dependencies = [ 1035 | "bitflags", 1036 | ] 1037 | 1038 | [[package]] 1039 | name = "redox_users" 1040 | version = "0.4.3" 1041 | source = "registry+https://github.com/rust-lang/crates.io-index" 1042 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1043 | dependencies = [ 1044 | "getrandom", 1045 | "redox_syscall", 1046 | "thiserror", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "ring" 1051 | version = "0.16.20" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1054 | dependencies = [ 1055 | "cc", 1056 | "libc", 1057 | "once_cell", 1058 | "spin", 1059 | "untrusted", 1060 | "web-sys", 1061 | "winapi", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "rustls" 1066 | version = "0.21.0" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" 1069 | dependencies = [ 1070 | "log", 1071 | "ring", 1072 | "rustls-webpki", 1073 | "sct", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "rustls-webpki" 1078 | version = "0.100.1" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" 1081 | dependencies = [ 1082 | "ring", 1083 | "untrusted", 1084 | ] 1085 | 1086 | [[package]] 1087 | name = "ryu" 1088 | version = "1.0.13" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 1091 | 1092 | [[package]] 1093 | name = "schemars" 1094 | version = "0.8.12" 1095 | source = "registry+https://github.com/rust-lang/crates.io-index" 1096 | checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" 1097 | dependencies = [ 1098 | "chrono", 1099 | "dyn-clone", 1100 | "schemars_derive", 1101 | "serde", 1102 | "serde_json", 1103 | ] 1104 | 1105 | [[package]] 1106 | name = "schemars_derive" 1107 | version = "0.8.12" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" 1110 | dependencies = [ 1111 | "proc-macro2", 1112 | "quote", 1113 | "serde_derive_internals", 1114 | "syn 1.0.109", 1115 | ] 1116 | 1117 | [[package]] 1118 | name = "scopeguard" 1119 | version = "1.1.0" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1122 | 1123 | [[package]] 1124 | name = "scratch" 1125 | version = "1.0.5" 1126 | source = "registry+https://github.com/rust-lang/crates.io-index" 1127 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" 1128 | 1129 | [[package]] 1130 | name = "sct" 1131 | version = "0.7.0" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1134 | dependencies = [ 1135 | "ring", 1136 | "untrusted", 1137 | ] 1138 | 1139 | [[package]] 1140 | name = "secrecy" 1141 | version = "0.8.0" 1142 | source = "registry+https://github.com/rust-lang/crates.io-index" 1143 | checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" 1144 | dependencies = [ 1145 | "serde", 1146 | "zeroize", 1147 | ] 1148 | 1149 | [[package]] 1150 | name = "serde" 1151 | version = "1.0.160" 1152 | source = "registry+https://github.com/rust-lang/crates.io-index" 1153 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 1154 | dependencies = [ 1155 | "serde_derive", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "serde-value" 1160 | version = "0.7.0" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" 1163 | dependencies = [ 1164 | "ordered-float", 1165 | "serde", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "serde_derive" 1170 | version = "1.0.160" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 1173 | dependencies = [ 1174 | "proc-macro2", 1175 | "quote", 1176 | "syn 2.0.15", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "serde_derive_internals" 1181 | version = "0.26.0" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" 1184 | dependencies = [ 1185 | "proc-macro2", 1186 | "quote", 1187 | "syn 1.0.109", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "serde_json" 1192 | version = "1.0.96" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 1195 | dependencies = [ 1196 | "indexmap", 1197 | "itoa", 1198 | "ryu", 1199 | "serde", 1200 | ] 1201 | 1202 | [[package]] 1203 | name = "serde_yaml" 1204 | version = "0.9.21" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" 1207 | dependencies = [ 1208 | "indexmap", 1209 | "itoa", 1210 | "ryu", 1211 | "serde", 1212 | "unsafe-libyaml", 1213 | ] 1214 | 1215 | [[package]] 1216 | name = "signal-hook-registry" 1217 | version = "1.4.1" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1220 | dependencies = [ 1221 | "libc", 1222 | ] 1223 | 1224 | [[package]] 1225 | name = "slab" 1226 | version = "0.4.8" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" 1229 | dependencies = [ 1230 | "autocfg", 1231 | ] 1232 | 1233 | [[package]] 1234 | name = "smallvec" 1235 | version = "1.10.0" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1238 | 1239 | [[package]] 1240 | name = "socket2" 1241 | version = "0.4.9" 1242 | source = "registry+https://github.com/rust-lang/crates.io-index" 1243 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1244 | dependencies = [ 1245 | "libc", 1246 | "winapi", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "spin" 1251 | version = "0.5.2" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1254 | 1255 | [[package]] 1256 | name = "strsim" 1257 | version = "0.10.0" 1258 | source = "registry+https://github.com/rust-lang/crates.io-index" 1259 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1260 | 1261 | [[package]] 1262 | name = "syn" 1263 | version = "1.0.109" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1266 | dependencies = [ 1267 | "proc-macro2", 1268 | "quote", 1269 | "unicode-ident", 1270 | ] 1271 | 1272 | [[package]] 1273 | name = "syn" 1274 | version = "2.0.15" 1275 | source = "registry+https://github.com/rust-lang/crates.io-index" 1276 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 1277 | dependencies = [ 1278 | "proc-macro2", 1279 | "quote", 1280 | "unicode-ident", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "termcolor" 1285 | version = "1.2.0" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 1288 | dependencies = [ 1289 | "winapi-util", 1290 | ] 1291 | 1292 | [[package]] 1293 | name = "thiserror" 1294 | version = "1.0.40" 1295 | source = "registry+https://github.com/rust-lang/crates.io-index" 1296 | checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" 1297 | dependencies = [ 1298 | "thiserror-impl", 1299 | ] 1300 | 1301 | [[package]] 1302 | name = "thiserror-impl" 1303 | version = "1.0.40" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" 1306 | dependencies = [ 1307 | "proc-macro2", 1308 | "quote", 1309 | "syn 2.0.15", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "tinyvec" 1314 | version = "1.6.0" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1317 | dependencies = [ 1318 | "tinyvec_macros", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "tinyvec_macros" 1323 | version = "0.1.1" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1326 | 1327 | [[package]] 1328 | name = "tokio" 1329 | version = "1.27.0" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" 1332 | dependencies = [ 1333 | "autocfg", 1334 | "bytes", 1335 | "libc", 1336 | "mio", 1337 | "num_cpus", 1338 | "parking_lot", 1339 | "pin-project-lite", 1340 | "signal-hook-registry", 1341 | "socket2", 1342 | "tokio-macros", 1343 | "windows-sys", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "tokio-io-timeout" 1348 | version = "1.2.0" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" 1351 | dependencies = [ 1352 | "pin-project-lite", 1353 | "tokio", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "tokio-macros" 1358 | version = "2.0.0" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" 1361 | dependencies = [ 1362 | "proc-macro2", 1363 | "quote", 1364 | "syn 2.0.15", 1365 | ] 1366 | 1367 | [[package]] 1368 | name = "tokio-openssl" 1369 | version = "0.6.3" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "c08f9ffb7809f1b20c1b398d92acf4cc719874b3b2b2d9ea2f09b4a80350878a" 1372 | dependencies = [ 1373 | "futures-util", 1374 | "openssl", 1375 | "openssl-sys", 1376 | "tokio", 1377 | ] 1378 | 1379 | [[package]] 1380 | name = "tokio-util" 1381 | version = "0.7.7" 1382 | source = "registry+https://github.com/rust-lang/crates.io-index" 1383 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 1384 | dependencies = [ 1385 | "bytes", 1386 | "futures-core", 1387 | "futures-sink", 1388 | "pin-project-lite", 1389 | "slab", 1390 | "tokio", 1391 | "tracing", 1392 | ] 1393 | 1394 | [[package]] 1395 | name = "tower" 1396 | version = "0.4.13" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1399 | dependencies = [ 1400 | "futures-core", 1401 | "futures-util", 1402 | "pin-project", 1403 | "pin-project-lite", 1404 | "tokio", 1405 | "tokio-util", 1406 | "tower-layer", 1407 | "tower-service", 1408 | "tracing", 1409 | ] 1410 | 1411 | [[package]] 1412 | name = "tower-http" 1413 | version = "0.4.0" 1414 | source = "registry+https://github.com/rust-lang/crates.io-index" 1415 | checksum = "5d1d42a9b3f3ec46ba828e8d376aec14592ea199f70a06a548587ecd1c4ab658" 1416 | dependencies = [ 1417 | "base64 0.20.0", 1418 | "bitflags", 1419 | "bytes", 1420 | "futures-core", 1421 | "futures-util", 1422 | "http", 1423 | "http-body", 1424 | "http-range-header", 1425 | "mime", 1426 | "pin-project-lite", 1427 | "tower-layer", 1428 | "tower-service", 1429 | "tracing", 1430 | ] 1431 | 1432 | [[package]] 1433 | name = "tower-layer" 1434 | version = "0.3.2" 1435 | source = "registry+https://github.com/rust-lang/crates.io-index" 1436 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 1437 | 1438 | [[package]] 1439 | name = "tower-service" 1440 | version = "0.3.2" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 1443 | 1444 | [[package]] 1445 | name = "tracing" 1446 | version = "0.1.37" 1447 | source = "registry+https://github.com/rust-lang/crates.io-index" 1448 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 1449 | dependencies = [ 1450 | "cfg-if", 1451 | "log", 1452 | "pin-project-lite", 1453 | "tracing-attributes", 1454 | "tracing-core", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "tracing-attributes" 1459 | version = "0.1.23" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 1462 | dependencies = [ 1463 | "proc-macro2", 1464 | "quote", 1465 | "syn 1.0.109", 1466 | ] 1467 | 1468 | [[package]] 1469 | name = "tracing-core" 1470 | version = "0.1.30" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 1473 | dependencies = [ 1474 | "once_cell", 1475 | ] 1476 | 1477 | [[package]] 1478 | name = "treediff" 1479 | version = "4.0.2" 1480 | source = "registry+https://github.com/rust-lang/crates.io-index" 1481 | checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" 1482 | dependencies = [ 1483 | "serde_json", 1484 | ] 1485 | 1486 | [[package]] 1487 | name = "try-lock" 1488 | version = "0.2.4" 1489 | source = "registry+https://github.com/rust-lang/crates.io-index" 1490 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 1491 | 1492 | [[package]] 1493 | name = "unicode-bidi" 1494 | version = "0.3.13" 1495 | source = "registry+https://github.com/rust-lang/crates.io-index" 1496 | checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 1497 | 1498 | [[package]] 1499 | name = "unicode-ident" 1500 | version = "1.0.8" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 1503 | 1504 | [[package]] 1505 | name = "unicode-normalization" 1506 | version = "0.1.22" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1509 | dependencies = [ 1510 | "tinyvec", 1511 | ] 1512 | 1513 | [[package]] 1514 | name = "unicode-width" 1515 | version = "0.1.10" 1516 | source = "registry+https://github.com/rust-lang/crates.io-index" 1517 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 1518 | 1519 | [[package]] 1520 | name = "unsafe-libyaml" 1521 | version = "0.2.8" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" 1524 | 1525 | [[package]] 1526 | name = "untrusted" 1527 | version = "0.7.1" 1528 | source = "registry+https://github.com/rust-lang/crates.io-index" 1529 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1530 | 1531 | [[package]] 1532 | name = "url" 1533 | version = "2.3.1" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" 1536 | dependencies = [ 1537 | "form_urlencoded", 1538 | "idna", 1539 | "percent-encoding", 1540 | ] 1541 | 1542 | [[package]] 1543 | name = "vcpkg" 1544 | version = "0.2.15" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1547 | 1548 | [[package]] 1549 | name = "version_check" 1550 | version = "0.9.4" 1551 | source = "registry+https://github.com/rust-lang/crates.io-index" 1552 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1553 | 1554 | [[package]] 1555 | name = "want" 1556 | version = "0.3.0" 1557 | source = "registry+https://github.com/rust-lang/crates.io-index" 1558 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1559 | dependencies = [ 1560 | "log", 1561 | "try-lock", 1562 | ] 1563 | 1564 | [[package]] 1565 | name = "wasi" 1566 | version = "0.11.0+wasi-snapshot-preview1" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1569 | 1570 | [[package]] 1571 | name = "wasm-bindgen" 1572 | version = "0.2.84" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" 1575 | dependencies = [ 1576 | "cfg-if", 1577 | "wasm-bindgen-macro", 1578 | ] 1579 | 1580 | [[package]] 1581 | name = "wasm-bindgen-backend" 1582 | version = "0.2.84" 1583 | source = "registry+https://github.com/rust-lang/crates.io-index" 1584 | checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" 1585 | dependencies = [ 1586 | "bumpalo", 1587 | "log", 1588 | "once_cell", 1589 | "proc-macro2", 1590 | "quote", 1591 | "syn 1.0.109", 1592 | "wasm-bindgen-shared", 1593 | ] 1594 | 1595 | [[package]] 1596 | name = "wasm-bindgen-macro" 1597 | version = "0.2.84" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" 1600 | dependencies = [ 1601 | "quote", 1602 | "wasm-bindgen-macro-support", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "wasm-bindgen-macro-support" 1607 | version = "0.2.84" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" 1610 | dependencies = [ 1611 | "proc-macro2", 1612 | "quote", 1613 | "syn 1.0.109", 1614 | "wasm-bindgen-backend", 1615 | "wasm-bindgen-shared", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "wasm-bindgen-shared" 1620 | version = "0.2.84" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" 1623 | 1624 | [[package]] 1625 | name = "web-sys" 1626 | version = "0.3.61" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" 1629 | dependencies = [ 1630 | "js-sys", 1631 | "wasm-bindgen", 1632 | ] 1633 | 1634 | [[package]] 1635 | name = "winapi" 1636 | version = "0.3.9" 1637 | source = "registry+https://github.com/rust-lang/crates.io-index" 1638 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1639 | dependencies = [ 1640 | "winapi-i686-pc-windows-gnu", 1641 | "winapi-x86_64-pc-windows-gnu", 1642 | ] 1643 | 1644 | [[package]] 1645 | name = "winapi-i686-pc-windows-gnu" 1646 | version = "0.4.0" 1647 | source = "registry+https://github.com/rust-lang/crates.io-index" 1648 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1649 | 1650 | [[package]] 1651 | name = "winapi-util" 1652 | version = "0.1.5" 1653 | source = "registry+https://github.com/rust-lang/crates.io-index" 1654 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1655 | dependencies = [ 1656 | "winapi", 1657 | ] 1658 | 1659 | [[package]] 1660 | name = "winapi-x86_64-pc-windows-gnu" 1661 | version = "0.4.0" 1662 | source = "registry+https://github.com/rust-lang/crates.io-index" 1663 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1664 | 1665 | [[package]] 1666 | name = "windows" 1667 | version = "0.48.0" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" 1670 | dependencies = [ 1671 | "windows-targets 0.48.0", 1672 | ] 1673 | 1674 | [[package]] 1675 | name = "windows-sys" 1676 | version = "0.45.0" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 1679 | dependencies = [ 1680 | "windows-targets 0.42.2", 1681 | ] 1682 | 1683 | [[package]] 1684 | name = "windows-targets" 1685 | version = "0.42.2" 1686 | source = "registry+https://github.com/rust-lang/crates.io-index" 1687 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 1688 | dependencies = [ 1689 | "windows_aarch64_gnullvm 0.42.2", 1690 | "windows_aarch64_msvc 0.42.2", 1691 | "windows_i686_gnu 0.42.2", 1692 | "windows_i686_msvc 0.42.2", 1693 | "windows_x86_64_gnu 0.42.2", 1694 | "windows_x86_64_gnullvm 0.42.2", 1695 | "windows_x86_64_msvc 0.42.2", 1696 | ] 1697 | 1698 | [[package]] 1699 | name = "windows-targets" 1700 | version = "0.48.0" 1701 | source = "registry+https://github.com/rust-lang/crates.io-index" 1702 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 1703 | dependencies = [ 1704 | "windows_aarch64_gnullvm 0.48.0", 1705 | "windows_aarch64_msvc 0.48.0", 1706 | "windows_i686_gnu 0.48.0", 1707 | "windows_i686_msvc 0.48.0", 1708 | "windows_x86_64_gnu 0.48.0", 1709 | "windows_x86_64_gnullvm 0.48.0", 1710 | "windows_x86_64_msvc 0.48.0", 1711 | ] 1712 | 1713 | [[package]] 1714 | name = "windows_aarch64_gnullvm" 1715 | version = "0.42.2" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 1718 | 1719 | [[package]] 1720 | name = "windows_aarch64_gnullvm" 1721 | version = "0.48.0" 1722 | source = "registry+https://github.com/rust-lang/crates.io-index" 1723 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 1724 | 1725 | [[package]] 1726 | name = "windows_aarch64_msvc" 1727 | version = "0.42.2" 1728 | source = "registry+https://github.com/rust-lang/crates.io-index" 1729 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 1730 | 1731 | [[package]] 1732 | name = "windows_aarch64_msvc" 1733 | version = "0.48.0" 1734 | source = "registry+https://github.com/rust-lang/crates.io-index" 1735 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 1736 | 1737 | [[package]] 1738 | name = "windows_i686_gnu" 1739 | version = "0.42.2" 1740 | source = "registry+https://github.com/rust-lang/crates.io-index" 1741 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 1742 | 1743 | [[package]] 1744 | name = "windows_i686_gnu" 1745 | version = "0.48.0" 1746 | source = "registry+https://github.com/rust-lang/crates.io-index" 1747 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 1748 | 1749 | [[package]] 1750 | name = "windows_i686_msvc" 1751 | version = "0.42.2" 1752 | source = "registry+https://github.com/rust-lang/crates.io-index" 1753 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 1754 | 1755 | [[package]] 1756 | name = "windows_i686_msvc" 1757 | version = "0.48.0" 1758 | source = "registry+https://github.com/rust-lang/crates.io-index" 1759 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 1760 | 1761 | [[package]] 1762 | name = "windows_x86_64_gnu" 1763 | version = "0.42.2" 1764 | source = "registry+https://github.com/rust-lang/crates.io-index" 1765 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 1766 | 1767 | [[package]] 1768 | name = "windows_x86_64_gnu" 1769 | version = "0.48.0" 1770 | source = "registry+https://github.com/rust-lang/crates.io-index" 1771 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 1772 | 1773 | [[package]] 1774 | name = "windows_x86_64_gnullvm" 1775 | version = "0.42.2" 1776 | source = "registry+https://github.com/rust-lang/crates.io-index" 1777 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 1778 | 1779 | [[package]] 1780 | name = "windows_x86_64_gnullvm" 1781 | version = "0.48.0" 1782 | source = "registry+https://github.com/rust-lang/crates.io-index" 1783 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 1784 | 1785 | [[package]] 1786 | name = "windows_x86_64_msvc" 1787 | version = "0.42.2" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 1790 | 1791 | [[package]] 1792 | name = "windows_x86_64_msvc" 1793 | version = "0.48.0" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 1796 | 1797 | [[package]] 1798 | name = "zeroize" 1799 | version = "1.6.0" 1800 | source = "registry+https://github.com/rust-lang/crates.io-index" 1801 | checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" 1802 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "operator-rs" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [[bin]] 9 | doc = false 10 | name = "crdgen" 11 | path = "src/crdgen.rs" 12 | 13 | [lib] 14 | name = "controller" 15 | path = "src/lib.rs" 16 | 17 | [dependencies] 18 | anyhow = { version= "1.0.70", features = ["default"] } 19 | kube = { version = "0.82.1", features = ["runtime", "derive"] } 20 | k8s-openapi = { version = "0.18.0", features = ["v1_26"] } 21 | tokio = { version = "1", features = ["full"] } 22 | rustls = "0.21.0" 23 | serde = { version = "1.0.148", features = ["derive"] } 24 | serde_json = "1.0.89" 25 | serde_yaml = "0.9.18" 26 | openssl = { version = "0.10.35", features = ["vendored"] } 27 | schemars = { version = "0.8.12", features = ["chrono"] } 28 | thiserror = "1.0.37" 29 | futures = "0.3.25" -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM cgr.dev/chainguard/static 2 | WORKDIR /app 3 | COPY --chown=nonroot:nonroot ./target/x86_64-unknown-linux-musl/release/operator-rs /app/ 4 | EXPOSE 8080 5 | ENTRYPOINT ["/app/operator-rs"] -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 AlyHKafoury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust Kubernetes Operator 2 | > This is an example kubernetes operator written in __rust__ that is fully functional. It has the basic functionality you need to expand upon and write a useful operator. 3 | 4 | ## How to use 5 | 6 | - First install rust latest rust at the time of writing "Version 1.64" 7 | - Make sure you have docker installed and you have access to a kubernetes cluster that can access your local docker repository eg: `Docker Desktop` 8 | - Run the following command to add the required rust compile target 9 | ```bash 10 | rustup target add x86_64-unknown-linux-musl 11 | ``` 12 | - Run the included `bash./build.sh` 13 | - Run the following command to generate the crds ` ./crdgen.sh` 14 | - Apply the yaml folder `kubectl apply -f ./yaml` 15 | - Finally apply the test workloads `kubectl apply -f test-workloads.yaml` 16 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-musl 2 | cargo build --release 3 | docker build . -t operator-rs:latest -------------------------------------------------------------------------------- /crdgen.sh: -------------------------------------------------------------------------------- 1 | target/x86_64-unknown-linux-musl/release/crdgen > yaml/crd.yaml -------------------------------------------------------------------------------- /src/controller.rs: -------------------------------------------------------------------------------- 1 | use futures::StreamExt; 2 | use k8s_openapi::{api::core::v1::{Pod, PodSpec, Container}, apimachinery::pkg::apis::meta::v1::OwnerReference}; 3 | use schemars::JsonSchema; 4 | use serde::{Deserialize, Serialize}; 5 | use serde_json::json; 6 | use thiserror::Error; 7 | 8 | use anyhow::Result; 9 | use kube::{ 10 | api::{Api, DeleteParams, ObjectMeta, Patch, PatchParams, PostParams, Resource}, 11 | runtime::{ 12 | controller::{Action, Controller}, 13 | finalizer::{finalizer, Event as Finalizer}, 14 | watcher, 15 | }, 16 | Client, CustomResource, 17 | }; 18 | use std::sync::Arc; 19 | use tokio::time::Duration; 20 | 21 | pub static WORKLOAD_FINALIZER: &str = "workload.example.dev"; 22 | 23 | #[derive(Debug, Error)] 24 | pub enum Error { 25 | #[error("Failed to create Pod: {0}")] 26 | PodCreationFailed(#[source] kube::Error), 27 | #[error("MissingObjectKey: {0}")] 28 | MissingObjectKey(&'static str), 29 | #[error("Finalizer Error: {0}")] 30 | // NB: awkward type because finalizer::Error embeds the reconciler error (which is this) 31 | // so boxing this error to break cycles 32 | FinalizerError(#[source] Box>), 33 | } 34 | 35 | /// Spec object for Workload 36 | #[derive(CustomResource, Deserialize, Serialize, Clone, Debug, JsonSchema)] 37 | #[kube(group = "example.dev", version = "v1", kind = "Workload", namespaced)] 38 | #[kube(status = "WorkloadStatus")] 39 | #[kube(scale = r#"{"specReplicasPath":".spec.replicas", "statusReplicasPath":".status.replicas"}"#)] 40 | pub struct WorkloadSpec { 41 | replicas: usize, 42 | } 43 | 44 | /// Status object for Workload 45 | #[derive(Deserialize, Serialize, Clone, Debug, Default, JsonSchema)] 46 | pub struct WorkloadStatus { 47 | pods: Vec, 48 | } 49 | 50 | pub struct Data { 51 | pub client: Client, 52 | } 53 | 54 | /// an error handler that will be called when the reconciler fails with access to both the 55 | /// object that caused the failure and the actual error 56 | pub fn error_policy(obj: Arc, error: &Error, _ctx: Arc) -> Action { 57 | println!("reconcile failed internal error: {:?}", error); 58 | Action::requeue(Duration::from_secs(60)) 59 | } 60 | 61 | fn create_pod(name: &str, namespace: &str, oref: OwnerReference) -> Pod { 62 | Pod { 63 | metadata: ObjectMeta { 64 | name: Some(name.to_owned()), 65 | namespace: Some(namespace.to_owned()), 66 | owner_references: Some(vec![oref]), 67 | ..Default::default() 68 | }, 69 | spec: Some( PodSpec { 70 | containers: vec![Container{ 71 | name: name.to_owned(), 72 | image: Some("busybox".to_owned()), 73 | command: Some(vec!["sleep".to_owned()]), 74 | args:Some(vec!["infinity".to_owned()]), 75 | ..Default::default() 76 | }], 77 | ..Default::default() 78 | }), 79 | ..Default::default() 80 | } 81 | } 82 | 83 | pub async fn reconcile(workload: Arc, ctx: Arc) -> Result { 84 | let client = &ctx.client; 85 | 86 | let namespace = workload 87 | .metadata 88 | .namespace 89 | .as_ref() 90 | .ok_or_else(|| Error::MissingObjectKey(".metadata.namespace")) 91 | .unwrap(); 92 | 93 | let name = workload 94 | .metadata 95 | .name 96 | .as_ref() 97 | .ok_or_else(|| Error::MissingObjectKey(".metadata.names")) 98 | .unwrap(); 99 | 100 | let oref = workload.controller_owner_ref(&()).unwrap(); 101 | 102 | let pods: Api = Api::namespaced(client.clone(), namespace); 103 | let workloads: Api = Api::namespaced(client.clone(), namespace); 104 | 105 | let current_workloads = workload 106 | .status 107 | .clone() 108 | .unwrap_or_else(|| WorkloadStatus::default()) 109 | .pods 110 | .len(); 111 | if current_workloads < workload.spec.replicas { 112 | let mut new_pods = Vec::::new(); 113 | for i in current_workloads..workload.spec.replicas { 114 | let mut pod_name = String::from("workload-pod-"); 115 | pod_name.push_str(name); 116 | pod_name.push_str("-"); 117 | pod_name.push_str(&i.to_string()); 118 | let pod = create_pod(&pod_name, &namespace, oref.clone()); 119 | let res = pods 120 | .patch( 121 | &pod_name, 122 | &PatchParams::apply("workload-Controller"), 123 | &Patch::Apply(pod.clone()), 124 | ) 125 | .await 126 | .map_err(Error::PodCreationFailed); 127 | println!("{:?}", res); 128 | match res { 129 | Ok(_) => new_pods.push(pod_name), 130 | Err(e) => println!("Pod Creation Failed {:?}", e), 131 | } 132 | } 133 | let update_status = json!({ 134 | "status": WorkloadStatus { pods: new_pods } 135 | }); 136 | workloads 137 | .patch_status(name, &PatchParams::default(), &Patch::Merge(&update_status)) 138 | .await; 139 | } 140 | 141 | finalizer(&workloads, WORKLOAD_FINALIZER, workload, |event| async { 142 | match event { 143 | Finalizer::Cleanup(workload) => { 144 | println!("Finalizing Workload: {} ...!", workload.meta().name.clone().unwrap()); 145 | Ok(Action::await_change()) 146 | }, 147 | _ => Ok(Action::await_change()), 148 | } 149 | }).await.map_err(|e| Error::FinalizerError(Box::new(e))); 150 | Ok(Action::requeue(Duration::from_secs(300))) 151 | } 152 | -------------------------------------------------------------------------------- /src/crdgen.rs: -------------------------------------------------------------------------------- 1 | use kube::CustomResourceExt; 2 | fn main() { 3 | print!("{}", serde_yaml::to_string(&controller::Workload::crd()).unwrap()) 4 | } -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod controller; 2 | pub use crate::controller::*; -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | pub use controller; 2 | 3 | use kube::{ 4 | api::{Api, ObjectMeta, Patch, PatchParams, Resource}, 5 | runtime::{ 6 | controller::{Action, Controller}, 7 | watcher, 8 | }, 9 | Client, CustomResource, 10 | }; 11 | use std::sync::Arc; 12 | use k8s_openapi::api::core::v1::Pod; 13 | use anyhow::Result; 14 | use thiserror::Error; 15 | use futures::StreamExt; 16 | 17 | #[tokio::main] 18 | async fn main() -> anyhow::Result<()> { 19 | let client = Client::try_default().await?; 20 | 21 | let wrkld = Api::::all(client.clone()); 22 | let podapi = Api::::all(client.clone()); 23 | 24 | Controller::new(wrkld, watcher::Config::default()) 25 | .owns(podapi, watcher::Config::default()) 26 | .shutdown_on_signal() 27 | .run(controller::reconcile, controller::error_policy, Arc::new(controller::Data { client })) 28 | .for_each(|res| async move { 29 | match res { 30 | Ok(o) => println!("reconciled {:?}", o), 31 | Err(e) => println!("reconcile failed: {}", e), 32 | } 33 | }) 34 | .await; 35 | 36 | 37 | Ok(()) 38 | } -------------------------------------------------------------------------------- /test-workloads.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: example.dev/v1 2 | kind: Workload 3 | metadata: 4 | name: w1 5 | finalizers: 6 | - workload.example.dev 7 | spec: 8 | replicas: 3 9 | --- 10 | apiVersion: example.dev/v1 11 | kind: Workload 12 | metadata: 13 | name: w2 14 | finalizers: 15 | - workload.example.dev 16 | spec: 17 | replicas: 3 -------------------------------------------------------------------------------- /yaml/crd.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apiextensions.k8s.io/v1 2 | kind: CustomResourceDefinition 3 | metadata: 4 | name: workloads.example.dev 5 | spec: 6 | group: example.dev 7 | names: 8 | categories: [] 9 | kind: Workload 10 | plural: workloads 11 | shortNames: [] 12 | singular: workload 13 | scope: Namespaced 14 | versions: 15 | - additionalPrinterColumns: [] 16 | name: v1 17 | schema: 18 | openAPIV3Schema: 19 | description: Auto-generated derived type for WorkloadSpec via `CustomResource` 20 | properties: 21 | spec: 22 | description: Spec object for Workload 23 | properties: 24 | replicas: 25 | format: uint 26 | minimum: 0.0 27 | type: integer 28 | required: 29 | - replicas 30 | type: object 31 | status: 32 | description: Status object for Workload 33 | nullable: true 34 | properties: 35 | pods: 36 | items: 37 | type: string 38 | type: array 39 | required: 40 | - pods 41 | type: object 42 | required: 43 | - spec 44 | title: Workload 45 | type: object 46 | served: true 47 | storage: true 48 | subresources: 49 | scale: 50 | specReplicasPath: .spec.replicas 51 | statusReplicasPath: .status.replicas 52 | status: {} 53 | -------------------------------------------------------------------------------- /yaml/operator.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | labels: 6 | app: workload-operator 7 | name: workload-operator 8 | spec: 9 | selector: 10 | matchLabels: 11 | app: workload-operator 12 | template: 13 | metadata: 14 | labels: 15 | app: workload-operator 16 | spec: 17 | serviceAccountName: workload-operator 18 | containers: 19 | - image: operator-rs:latest 20 | imagePullPolicy: IfNotPresent 21 | name: workload-operator 22 | ports: 23 | - containerPort: 3000 24 | name: https 25 | protocol: TCP 26 | --- 27 | apiVersion: v1 28 | kind: ServiceAccount 29 | metadata: 30 | name: workload-operator 31 | labels: 32 | app: workload-operator 33 | --- 34 | apiVersion: rbac.authorization.k8s.io/v1 35 | kind: ClusterRole 36 | metadata: 37 | name: workload-operator 38 | rules: 39 | - apiGroups: 40 | - '' 41 | resources: 42 | - pods 43 | verbs: ["*"] 44 | - apiGroups: ["events.k8s.io"] 45 | resources: ["events"] 46 | verbs: ["create"] 47 | - apiGroups: ["example.dev"] 48 | resources: ["*"] 49 | verbs: ["get", "list", "watch", "patch"] 50 | --- 51 | apiVersion: rbac.authorization.k8s.io/v1 52 | kind: ClusterRoleBinding 53 | metadata: 54 | name: workload-operator 55 | roleRef: 56 | apiGroup: rbac.authorization.k8s.io 57 | kind: ClusterRole 58 | name: workload-operator 59 | subjects: 60 | - apiGroup: '' 61 | kind: ServiceAccount 62 | name: workload-operator 63 | namespace: default --------------------------------------------------------------------------------