├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── deploy.yml ├── log4rs.yml └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | .idea 3 | *.iml 4 | -------------------------------------------------------------------------------- /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 = "aho-corasick" 7 | version = "0.7.18" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 10 | dependencies = [ 11 | "memchr", 12 | ] 13 | 14 | [[package]] 15 | name = "anyhow" 16 | version = "1.0.40" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" 19 | 20 | [[package]] 21 | name = "arc-swap" 22 | version = "0.4.8" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "dabe5a181f83789739c194cbe5a897dde195078fac08568d09221fd6137a7ba8" 25 | 26 | [[package]] 27 | name = "autocfg" 28 | version = "1.0.1" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 31 | 32 | [[package]] 33 | name = "base64" 34 | version = "0.13.0" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 37 | 38 | [[package]] 39 | name = "bitflags" 40 | version = "1.2.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 43 | 44 | [[package]] 45 | name = "bytes" 46 | version = "1.0.1" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" 49 | 50 | [[package]] 51 | name = "cc" 52 | version = "1.0.67" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" 55 | 56 | [[package]] 57 | name = "cfg-if" 58 | version = "1.0.0" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 61 | 62 | [[package]] 63 | name = "chrono" 64 | version = "0.4.19" 65 | source = "registry+https://github.com/rust-lang/crates.io-index" 66 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 67 | dependencies = [ 68 | "libc", 69 | "num-integer", 70 | "num-traits", 71 | "serde", 72 | "time", 73 | "winapi", 74 | ] 75 | 76 | [[package]] 77 | name = "core-foundation" 78 | version = "0.9.1" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" 81 | dependencies = [ 82 | "core-foundation-sys", 83 | "libc", 84 | ] 85 | 86 | [[package]] 87 | name = "core-foundation-sys" 88 | version = "0.8.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" 91 | 92 | [[package]] 93 | name = "derivative" 94 | version = "2.2.0" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "syn", 101 | ] 102 | 103 | [[package]] 104 | name = "dirs-next" 105 | version = "2.0.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 108 | dependencies = [ 109 | "cfg-if", 110 | "dirs-sys-next", 111 | ] 112 | 113 | [[package]] 114 | name = "dirs-sys-next" 115 | version = "0.1.2" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 118 | dependencies = [ 119 | "libc", 120 | "redox_users", 121 | "winapi", 122 | ] 123 | 124 | [[package]] 125 | name = "dtoa" 126 | version = "0.4.8" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" 129 | 130 | [[package]] 131 | name = "either" 132 | version = "1.6.1" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 135 | 136 | [[package]] 137 | name = "fnv" 138 | version = "1.0.7" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 141 | 142 | [[package]] 143 | name = "foreign-types" 144 | version = "0.3.2" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 147 | dependencies = [ 148 | "foreign-types-shared", 149 | ] 150 | 151 | [[package]] 152 | name = "foreign-types-shared" 153 | version = "0.1.1" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 156 | 157 | [[package]] 158 | name = "form_urlencoded" 159 | version = "1.0.1" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 162 | dependencies = [ 163 | "matches", 164 | "percent-encoding", 165 | ] 166 | 167 | [[package]] 168 | name = "futures" 169 | version = "0.3.16" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "1adc00f486adfc9ce99f77d717836f0c5aa84965eb0b4f051f4e83f7cab53f8b" 172 | dependencies = [ 173 | "futures-channel", 174 | "futures-core", 175 | "futures-executor", 176 | "futures-io", 177 | "futures-sink", 178 | "futures-task", 179 | "futures-util", 180 | ] 181 | 182 | [[package]] 183 | name = "futures-channel" 184 | version = "0.3.16" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "74ed2411805f6e4e3d9bc904c95d5d423b89b3b25dc0250aa74729de20629ff9" 187 | dependencies = [ 188 | "futures-core", 189 | "futures-sink", 190 | ] 191 | 192 | [[package]] 193 | name = "futures-core" 194 | version = "0.3.16" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "af51b1b4a7fdff033703db39de8802c673eb91855f2e0d47dcf3bf2c0ef01f99" 197 | 198 | [[package]] 199 | name = "futures-executor" 200 | version = "0.3.16" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "4d0d535a57b87e1ae31437b892713aee90cd2d7b0ee48727cd11fc72ef54761c" 203 | dependencies = [ 204 | "futures-core", 205 | "futures-task", 206 | "futures-util", 207 | ] 208 | 209 | [[package]] 210 | name = "futures-io" 211 | version = "0.3.16" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "0b0e06c393068f3a6ef246c75cdca793d6a46347e75286933e5e75fd2fd11582" 214 | 215 | [[package]] 216 | name = "futures-macro" 217 | version = "0.3.16" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "c54913bae956fb8df7f4dc6fc90362aa72e69148e3f39041fbe8742d21e0ac57" 220 | dependencies = [ 221 | "autocfg", 222 | "proc-macro-hack", 223 | "proc-macro2", 224 | "quote", 225 | "syn", 226 | ] 227 | 228 | [[package]] 229 | name = "futures-sink" 230 | version = "0.3.16" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "c0f30aaa67363d119812743aa5f33c201a7a66329f97d1a887022971feea4b53" 233 | 234 | [[package]] 235 | name = "futures-task" 236 | version = "0.3.16" 237 | source = "registry+https://github.com/rust-lang/crates.io-index" 238 | checksum = "bbe54a98670017f3be909561f6ad13e810d9a51f3f061b902062ca3da80799f2" 239 | 240 | [[package]] 241 | name = "futures-util" 242 | version = "0.3.16" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "67eb846bfd58e44a8481a00049e82c43e0ccb5d61f8dc071057cb19249dd4d78" 245 | dependencies = [ 246 | "autocfg", 247 | "futures-channel", 248 | "futures-core", 249 | "futures-io", 250 | "futures-macro", 251 | "futures-sink", 252 | "futures-task", 253 | "memchr", 254 | "pin-project-lite", 255 | "pin-utils", 256 | "proc-macro-hack", 257 | "proc-macro-nested", 258 | "slab", 259 | ] 260 | 261 | [[package]] 262 | name = "getrandom" 263 | version = "0.2.2" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" 266 | dependencies = [ 267 | "cfg-if", 268 | "libc", 269 | "wasi", 270 | ] 271 | 272 | [[package]] 273 | name = "hashbrown" 274 | version = "0.9.1" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 277 | 278 | [[package]] 279 | name = "hermit-abi" 280 | version = "0.1.18" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" 283 | dependencies = [ 284 | "libc", 285 | ] 286 | 287 | [[package]] 288 | name = "http" 289 | version = "0.2.4" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" 292 | dependencies = [ 293 | "bytes", 294 | "fnv", 295 | "itoa", 296 | ] 297 | 298 | [[package]] 299 | name = "http-body" 300 | version = "0.4.2" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" 303 | dependencies = [ 304 | "bytes", 305 | "http", 306 | "pin-project-lite", 307 | ] 308 | 309 | [[package]] 310 | name = "httparse" 311 | version = "1.5.1" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" 314 | 315 | [[package]] 316 | name = "httpdate" 317 | version = "1.0.0" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" 320 | 321 | [[package]] 322 | name = "humantime" 323 | version = "2.1.0" 324 | source = "registry+https://github.com/rust-lang/crates.io-index" 325 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 326 | 327 | [[package]] 328 | name = "hyper" 329 | version = "0.14.12" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" 332 | dependencies = [ 333 | "bytes", 334 | "futures-channel", 335 | "futures-core", 336 | "futures-util", 337 | "http", 338 | "http-body", 339 | "httparse", 340 | "httpdate", 341 | "itoa", 342 | "pin-project-lite", 343 | "socket2", 344 | "tokio", 345 | "tower-service", 346 | "tracing", 347 | "want", 348 | ] 349 | 350 | [[package]] 351 | name = "hyper-timeout" 352 | version = "0.4.1" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" 355 | dependencies = [ 356 | "hyper", 357 | "pin-project-lite", 358 | "tokio", 359 | "tokio-io-timeout", 360 | ] 361 | 362 | [[package]] 363 | name = "hyper-tls" 364 | version = "0.5.0" 365 | source = "registry+https://github.com/rust-lang/crates.io-index" 366 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 367 | dependencies = [ 368 | "bytes", 369 | "hyper", 370 | "native-tls", 371 | "tokio", 372 | "tokio-native-tls", 373 | ] 374 | 375 | [[package]] 376 | name = "indexmap" 377 | version = "1.6.2" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" 380 | dependencies = [ 381 | "autocfg", 382 | "hashbrown", 383 | ] 384 | 385 | [[package]] 386 | name = "instant" 387 | version = "0.1.9" 388 | source = "registry+https://github.com/rust-lang/crates.io-index" 389 | checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" 390 | dependencies = [ 391 | "cfg-if", 392 | ] 393 | 394 | [[package]] 395 | name = "itoa" 396 | version = "0.4.7" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" 399 | 400 | [[package]] 401 | name = "jsonpath_lib" 402 | version = "0.3.0" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "eaa63191d68230cccb81c5aa23abd53ed64d83337cacbb25a7b8c7979523774f" 405 | dependencies = [ 406 | "log", 407 | "serde", 408 | "serde_json", 409 | ] 410 | 411 | [[package]] 412 | name = "k8s-openapi" 413 | version = "0.13.0" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "748acc444200aa3528dc131a8048e131a9e75a611a52d152e276e99199313d1a" 416 | dependencies = [ 417 | "base64", 418 | "bytes", 419 | "chrono", 420 | "serde", 421 | "serde-value", 422 | "serde_json", 423 | ] 424 | 425 | [[package]] 426 | name = "kube" 427 | version = "0.59.0" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "f2bfa22c305a6d817b57a7afcd2e6ee23c80c6c93933edb02f210fdf73f837cc" 430 | dependencies = [ 431 | "base64", 432 | "bytes", 433 | "chrono", 434 | "dirs-next", 435 | "either", 436 | "futures", 437 | "http", 438 | "http-body", 439 | "hyper", 440 | "hyper-timeout", 441 | "hyper-tls", 442 | "jsonpath_lib", 443 | "k8s-openapi", 444 | "kube-core", 445 | "openssl", 446 | "pem", 447 | "pin-project", 448 | "serde", 449 | "serde_json", 450 | "serde_yaml", 451 | "thiserror", 452 | "tokio", 453 | "tokio-native-tls", 454 | "tokio-util", 455 | "tower", 456 | "tower-http", 457 | "tracing", 458 | ] 459 | 460 | [[package]] 461 | name = "kube-core" 462 | version = "0.59.0" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "9c33d2272d8e530938bafc6cf4ac76f2a6f6c9ca684defcfab6c357913a43bcc" 465 | dependencies = [ 466 | "form_urlencoded", 467 | "http", 468 | "k8s-openapi", 469 | "once_cell", 470 | "serde", 471 | "serde_json", 472 | "thiserror", 473 | ] 474 | 475 | [[package]] 476 | name = "lazy_static" 477 | version = "1.4.0" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 480 | 481 | [[package]] 482 | name = "libc" 483 | version = "0.2.94" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" 486 | 487 | [[package]] 488 | name = "linked-hash-map" 489 | version = "0.5.4" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" 492 | 493 | [[package]] 494 | name = "lock_api" 495 | version = "0.4.4" 496 | source = "registry+https://github.com/rust-lang/crates.io-index" 497 | checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" 498 | dependencies = [ 499 | "scopeguard", 500 | ] 501 | 502 | [[package]] 503 | name = "log" 504 | version = "0.4.14" 505 | source = "registry+https://github.com/rust-lang/crates.io-index" 506 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 507 | dependencies = [ 508 | "cfg-if", 509 | "serde", 510 | ] 511 | 512 | [[package]] 513 | name = "log-mdc" 514 | version = "0.1.0" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" 517 | 518 | [[package]] 519 | name = "log4rs" 520 | version = "1.0.0" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "d1572a880d1115ff867396eee7ae2bc924554225e67a0d3c85c745b3e60ca211" 523 | dependencies = [ 524 | "anyhow", 525 | "arc-swap", 526 | "chrono", 527 | "derivative", 528 | "fnv", 529 | "humantime", 530 | "libc", 531 | "log", 532 | "log-mdc", 533 | "parking_lot", 534 | "regex", 535 | "serde", 536 | "serde-value", 537 | "serde_json", 538 | "serde_yaml", 539 | "thiserror", 540 | "thread-id", 541 | "typemap", 542 | "winapi", 543 | ] 544 | 545 | [[package]] 546 | name = "matches" 547 | version = "0.1.8" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 550 | 551 | [[package]] 552 | name = "memchr" 553 | version = "2.4.0" 554 | source = "registry+https://github.com/rust-lang/crates.io-index" 555 | checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" 556 | 557 | [[package]] 558 | name = "mio" 559 | version = "0.7.11" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" 562 | dependencies = [ 563 | "libc", 564 | "log", 565 | "miow", 566 | "ntapi", 567 | "winapi", 568 | ] 569 | 570 | [[package]] 571 | name = "miow" 572 | version = "0.3.7" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 575 | dependencies = [ 576 | "winapi", 577 | ] 578 | 579 | [[package]] 580 | name = "native-tls" 581 | version = "0.2.7" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" 584 | dependencies = [ 585 | "lazy_static", 586 | "libc", 587 | "log", 588 | "openssl", 589 | "openssl-probe", 590 | "openssl-sys", 591 | "schannel", 592 | "security-framework", 593 | "security-framework-sys", 594 | "tempfile", 595 | ] 596 | 597 | [[package]] 598 | name = "ntapi" 599 | version = "0.3.6" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 602 | dependencies = [ 603 | "winapi", 604 | ] 605 | 606 | [[package]] 607 | name = "num-integer" 608 | version = "0.1.44" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 611 | dependencies = [ 612 | "autocfg", 613 | "num-traits", 614 | ] 615 | 616 | [[package]] 617 | name = "num-traits" 618 | version = "0.2.14" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 621 | dependencies = [ 622 | "autocfg", 623 | ] 624 | 625 | [[package]] 626 | name = "num_cpus" 627 | version = "1.13.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 630 | dependencies = [ 631 | "hermit-abi", 632 | "libc", 633 | ] 634 | 635 | [[package]] 636 | name = "once_cell" 637 | version = "1.8.0" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 640 | 641 | [[package]] 642 | name = "openssl" 643 | version = "0.10.34" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8" 646 | dependencies = [ 647 | "bitflags", 648 | "cfg-if", 649 | "foreign-types", 650 | "libc", 651 | "once_cell", 652 | "openssl-sys", 653 | ] 654 | 655 | [[package]] 656 | name = "openssl-probe" 657 | version = "0.1.2" 658 | source = "registry+https://github.com/rust-lang/crates.io-index" 659 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 660 | 661 | [[package]] 662 | name = "openssl-sys" 663 | version = "0.9.63" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98" 666 | dependencies = [ 667 | "autocfg", 668 | "cc", 669 | "libc", 670 | "pkg-config", 671 | "vcpkg", 672 | ] 673 | 674 | [[package]] 675 | name = "ordered-float" 676 | version = "2.2.0" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "b50b8919aecb97e5ee9aceef27e24f39c46b11831130f4a6b7b091ec5de0de12" 679 | dependencies = [ 680 | "num-traits", 681 | ] 682 | 683 | [[package]] 684 | name = "parking_lot" 685 | version = "0.11.1" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" 688 | dependencies = [ 689 | "instant", 690 | "lock_api", 691 | "parking_lot_core", 692 | ] 693 | 694 | [[package]] 695 | name = "parking_lot_core" 696 | version = "0.8.3" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" 699 | dependencies = [ 700 | "cfg-if", 701 | "instant", 702 | "libc", 703 | "redox_syscall 0.2.8", 704 | "smallvec", 705 | "winapi", 706 | ] 707 | 708 | [[package]] 709 | name = "pem" 710 | version = "0.8.3" 711 | source = "registry+https://github.com/rust-lang/crates.io-index" 712 | checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" 713 | dependencies = [ 714 | "base64", 715 | "once_cell", 716 | "regex", 717 | ] 718 | 719 | [[package]] 720 | name = "percent-encoding" 721 | version = "2.1.0" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 724 | 725 | [[package]] 726 | name = "pin-project" 727 | version = "1.0.7" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" 730 | dependencies = [ 731 | "pin-project-internal", 732 | ] 733 | 734 | [[package]] 735 | name = "pin-project-internal" 736 | version = "1.0.7" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" 739 | dependencies = [ 740 | "proc-macro2", 741 | "quote", 742 | "syn", 743 | ] 744 | 745 | [[package]] 746 | name = "pin-project-lite" 747 | version = "0.2.6" 748 | source = "registry+https://github.com/rust-lang/crates.io-index" 749 | checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" 750 | 751 | [[package]] 752 | name = "pin-utils" 753 | version = "0.1.0" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 756 | 757 | [[package]] 758 | name = "pkg-config" 759 | version = "0.3.19" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" 762 | 763 | [[package]] 764 | name = "ppv-lite86" 765 | version = "0.2.10" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 768 | 769 | [[package]] 770 | name = "proc-macro-hack" 771 | version = "0.5.19" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 774 | 775 | [[package]] 776 | name = "proc-macro-nested" 777 | version = "0.1.7" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 780 | 781 | [[package]] 782 | name = "proc-macro2" 783 | version = "1.0.26" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" 786 | dependencies = [ 787 | "unicode-xid", 788 | ] 789 | 790 | [[package]] 791 | name = "quote" 792 | version = "1.0.9" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 795 | dependencies = [ 796 | "proc-macro2", 797 | ] 798 | 799 | [[package]] 800 | name = "rand" 801 | version = "0.8.3" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" 804 | dependencies = [ 805 | "libc", 806 | "rand_chacha", 807 | "rand_core", 808 | "rand_hc", 809 | ] 810 | 811 | [[package]] 812 | name = "rand_chacha" 813 | version = "0.3.0" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" 816 | dependencies = [ 817 | "ppv-lite86", 818 | "rand_core", 819 | ] 820 | 821 | [[package]] 822 | name = "rand_core" 823 | version = "0.6.2" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" 826 | dependencies = [ 827 | "getrandom", 828 | ] 829 | 830 | [[package]] 831 | name = "rand_hc" 832 | version = "0.3.0" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" 835 | dependencies = [ 836 | "rand_core", 837 | ] 838 | 839 | [[package]] 840 | name = "redox_syscall" 841 | version = "0.1.57" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 844 | 845 | [[package]] 846 | name = "redox_syscall" 847 | version = "0.2.8" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" 850 | dependencies = [ 851 | "bitflags", 852 | ] 853 | 854 | [[package]] 855 | name = "redox_users" 856 | version = "0.4.0" 857 | source = "registry+https://github.com/rust-lang/crates.io-index" 858 | checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" 859 | dependencies = [ 860 | "getrandom", 861 | "redox_syscall 0.2.8", 862 | ] 863 | 864 | [[package]] 865 | name = "regex" 866 | version = "1.5.4" 867 | source = "registry+https://github.com/rust-lang/crates.io-index" 868 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 869 | dependencies = [ 870 | "aho-corasick", 871 | "memchr", 872 | "regex-syntax", 873 | ] 874 | 875 | [[package]] 876 | name = "regex-syntax" 877 | version = "0.6.25" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 880 | 881 | [[package]] 882 | name = "remove_dir_all" 883 | version = "0.5.3" 884 | source = "registry+https://github.com/rust-lang/crates.io-index" 885 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 886 | dependencies = [ 887 | "winapi", 888 | ] 889 | 890 | [[package]] 891 | name = "rust-operator" 892 | version = "0.1.0" 893 | dependencies = [ 894 | "futures", 895 | "k8s-openapi", 896 | "kube", 897 | "log", 898 | "log4rs", 899 | "tokio", 900 | ] 901 | 902 | [[package]] 903 | name = "ryu" 904 | version = "1.0.5" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 907 | 908 | [[package]] 909 | name = "schannel" 910 | version = "0.1.19" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 913 | dependencies = [ 914 | "lazy_static", 915 | "winapi", 916 | ] 917 | 918 | [[package]] 919 | name = "scopeguard" 920 | version = "1.1.0" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 923 | 924 | [[package]] 925 | name = "security-framework" 926 | version = "2.2.0" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84" 929 | dependencies = [ 930 | "bitflags", 931 | "core-foundation", 932 | "core-foundation-sys", 933 | "libc", 934 | "security-framework-sys", 935 | ] 936 | 937 | [[package]] 938 | name = "security-framework-sys" 939 | version = "2.2.0" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339" 942 | dependencies = [ 943 | "core-foundation-sys", 944 | "libc", 945 | ] 946 | 947 | [[package]] 948 | name = "serde" 949 | version = "1.0.125" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" 952 | dependencies = [ 953 | "serde_derive", 954 | ] 955 | 956 | [[package]] 957 | name = "serde-value" 958 | version = "0.7.0" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" 961 | dependencies = [ 962 | "ordered-float", 963 | "serde", 964 | ] 965 | 966 | [[package]] 967 | name = "serde_derive" 968 | version = "1.0.125" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" 971 | dependencies = [ 972 | "proc-macro2", 973 | "quote", 974 | "syn", 975 | ] 976 | 977 | [[package]] 978 | name = "serde_json" 979 | version = "1.0.64" 980 | source = "registry+https://github.com/rust-lang/crates.io-index" 981 | checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" 982 | dependencies = [ 983 | "indexmap", 984 | "itoa", 985 | "ryu", 986 | "serde", 987 | ] 988 | 989 | [[package]] 990 | name = "serde_yaml" 991 | version = "0.8.17" 992 | source = "registry+https://github.com/rust-lang/crates.io-index" 993 | checksum = "15654ed4ab61726bf918a39cb8d98a2e2995b002387807fa6ba58fdf7f59bb23" 994 | dependencies = [ 995 | "dtoa", 996 | "linked-hash-map", 997 | "serde", 998 | "yaml-rust", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "signal-hook-registry" 1003 | version = "1.3.0" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" 1006 | dependencies = [ 1007 | "libc", 1008 | ] 1009 | 1010 | [[package]] 1011 | name = "slab" 1012 | version = "0.4.3" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" 1015 | 1016 | [[package]] 1017 | name = "smallvec" 1018 | version = "1.6.1" 1019 | source = "registry+https://github.com/rust-lang/crates.io-index" 1020 | checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" 1021 | 1022 | [[package]] 1023 | name = "socket2" 1024 | version = "0.4.0" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" 1027 | dependencies = [ 1028 | "libc", 1029 | "winapi", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "syn" 1034 | version = "1.0.72" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" 1037 | dependencies = [ 1038 | "proc-macro2", 1039 | "quote", 1040 | "unicode-xid", 1041 | ] 1042 | 1043 | [[package]] 1044 | name = "tempfile" 1045 | version = "3.2.0" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 1048 | dependencies = [ 1049 | "cfg-if", 1050 | "libc", 1051 | "rand", 1052 | "redox_syscall 0.2.8", 1053 | "remove_dir_all", 1054 | "winapi", 1055 | ] 1056 | 1057 | [[package]] 1058 | name = "thiserror" 1059 | version = "1.0.24" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" 1062 | dependencies = [ 1063 | "thiserror-impl", 1064 | ] 1065 | 1066 | [[package]] 1067 | name = "thiserror-impl" 1068 | version = "1.0.24" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" 1071 | dependencies = [ 1072 | "proc-macro2", 1073 | "quote", 1074 | "syn", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "thread-id" 1079 | version = "3.3.0" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1" 1082 | dependencies = [ 1083 | "libc", 1084 | "redox_syscall 0.1.57", 1085 | "winapi", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "time" 1090 | version = "0.1.44" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" 1093 | dependencies = [ 1094 | "libc", 1095 | "wasi", 1096 | "winapi", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "tokio" 1101 | version = "1.10.1" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "92036be488bb6594459f2e03b60e42df6f937fe6ca5c5ffdcb539c6b84dc40f5" 1104 | dependencies = [ 1105 | "autocfg", 1106 | "bytes", 1107 | "libc", 1108 | "memchr", 1109 | "mio", 1110 | "num_cpus", 1111 | "once_cell", 1112 | "parking_lot", 1113 | "pin-project-lite", 1114 | "signal-hook-registry", 1115 | "tokio-macros", 1116 | "winapi", 1117 | ] 1118 | 1119 | [[package]] 1120 | name = "tokio-io-timeout" 1121 | version = "1.1.1" 1122 | source = "registry+https://github.com/rust-lang/crates.io-index" 1123 | checksum = "90c49f106be240de154571dd31fbe48acb10ba6c6dd6f6517ad603abffa42de9" 1124 | dependencies = [ 1125 | "pin-project-lite", 1126 | "tokio", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "tokio-macros" 1131 | version = "1.1.0" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" 1134 | dependencies = [ 1135 | "proc-macro2", 1136 | "quote", 1137 | "syn", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "tokio-native-tls" 1142 | version = "0.3.0" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1145 | dependencies = [ 1146 | "native-tls", 1147 | "tokio", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "tokio-util" 1152 | version = "0.6.6" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "940a12c99365c31ea8dd9ba04ec1be183ffe4920102bb7122c2f515437601e8e" 1155 | dependencies = [ 1156 | "bytes", 1157 | "futures-core", 1158 | "futures-sink", 1159 | "log", 1160 | "pin-project-lite", 1161 | "tokio", 1162 | ] 1163 | 1164 | [[package]] 1165 | name = "tower" 1166 | version = "0.4.7" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | checksum = "bf0aa6dfc29148c3826708dabbfa83c121eeb84df4d1468220825e3a33651687" 1169 | dependencies = [ 1170 | "futures-core", 1171 | "futures-util", 1172 | "pin-project", 1173 | "tokio", 1174 | "tokio-util", 1175 | "tower-layer", 1176 | "tower-service", 1177 | "tracing", 1178 | ] 1179 | 1180 | [[package]] 1181 | name = "tower-http" 1182 | version = "0.1.1" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "0b7b56efe69aa0ad2b5da6b942e57ea9f6fe683b7a314d4ff48662e2c8838de1" 1185 | dependencies = [ 1186 | "base64", 1187 | "bytes", 1188 | "futures-core", 1189 | "futures-util", 1190 | "http", 1191 | "http-body", 1192 | "pin-project", 1193 | "tower-layer", 1194 | "tower-service", 1195 | "tracing", 1196 | ] 1197 | 1198 | [[package]] 1199 | name = "tower-layer" 1200 | version = "0.3.1" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" 1203 | 1204 | [[package]] 1205 | name = "tower-service" 1206 | version = "0.3.1" 1207 | source = "registry+https://github.com/rust-lang/crates.io-index" 1208 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 1209 | 1210 | [[package]] 1211 | name = "tracing" 1212 | version = "0.1.26" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" 1215 | dependencies = [ 1216 | "cfg-if", 1217 | "log", 1218 | "pin-project-lite", 1219 | "tracing-attributes", 1220 | "tracing-core", 1221 | ] 1222 | 1223 | [[package]] 1224 | name = "tracing-attributes" 1225 | version = "0.1.15" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" 1228 | dependencies = [ 1229 | "proc-macro2", 1230 | "quote", 1231 | "syn", 1232 | ] 1233 | 1234 | [[package]] 1235 | name = "tracing-core" 1236 | version = "0.1.18" 1237 | source = "registry+https://github.com/rust-lang/crates.io-index" 1238 | checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" 1239 | dependencies = [ 1240 | "lazy_static", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "traitobject" 1245 | version = "0.1.0" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 1248 | 1249 | [[package]] 1250 | name = "try-lock" 1251 | version = "0.2.3" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1254 | 1255 | [[package]] 1256 | name = "typemap" 1257 | version = "0.3.3" 1258 | source = "registry+https://github.com/rust-lang/crates.io-index" 1259 | checksum = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" 1260 | dependencies = [ 1261 | "unsafe-any", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "unicode-xid" 1266 | version = "0.2.2" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 1269 | 1270 | [[package]] 1271 | name = "unsafe-any" 1272 | version = "0.4.2" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" 1275 | dependencies = [ 1276 | "traitobject", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "vcpkg" 1281 | version = "0.2.12" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d" 1284 | 1285 | [[package]] 1286 | name = "want" 1287 | version = "0.3.0" 1288 | source = "registry+https://github.com/rust-lang/crates.io-index" 1289 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1290 | dependencies = [ 1291 | "log", 1292 | "try-lock", 1293 | ] 1294 | 1295 | [[package]] 1296 | name = "wasi" 1297 | version = "0.10.0+wasi-snapshot-preview1" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1300 | 1301 | [[package]] 1302 | name = "winapi" 1303 | version = "0.3.9" 1304 | source = "registry+https://github.com/rust-lang/crates.io-index" 1305 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1306 | dependencies = [ 1307 | "winapi-i686-pc-windows-gnu", 1308 | "winapi-x86_64-pc-windows-gnu", 1309 | ] 1310 | 1311 | [[package]] 1312 | name = "winapi-i686-pc-windows-gnu" 1313 | version = "0.4.0" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1316 | 1317 | [[package]] 1318 | name = "winapi-x86_64-pc-windows-gnu" 1319 | version = "0.4.0" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1322 | 1323 | [[package]] 1324 | name = "yaml-rust" 1325 | version = "0.4.5" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 1328 | dependencies = [ 1329 | "linked-hash-map", 1330 | ] 1331 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust-operator" 3 | version = "0.1.0" 4 | authors = ["Nicolas Frankel "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | futures = "0.3.16" 9 | log4rs = "1.0.0" 10 | log = "0.4.14" 11 | kube = "0.59.0" 12 | k8s-openapi = { version = "0.13.0", default-features = false, features = ["v1_19"] } 13 | tokio = { version = "1.10.1", features = ["full"] } 14 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t rust-operator:1c . 2 | FROM ekidd/rust-musl-builder:1.51.0 as build 3 | 4 | WORKDIR /app 5 | 6 | COPY src src 7 | COPY Cargo.lock . 8 | COPY Cargo.toml . 9 | 10 | RUN cargo build --release 11 | 12 | FROM scratch 13 | 14 | WORKDIR /app 15 | 16 | COPY --from=build /app/target/x86_64-unknown-linux-musl/release/rust-operator /app 17 | COPY log4rs.yml . 18 | 19 | CMD ["./rust-operator"] 20 | -------------------------------------------------------------------------------- /deploy.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Namespace 3 | metadata: 4 | name: rustoperator 5 | --- 6 | apiVersion: rbac.authorization.k8s.io/v1 7 | kind: ClusterRole 8 | metadata: 9 | namespace: rustoperator 10 | name: operator-example 11 | rules: 12 | - apiGroups: 13 | - "" 14 | resources: 15 | - pods 16 | verbs: 17 | - list 18 | - watch 19 | - create 20 | - delete 21 | --- 22 | apiVersion: v1 23 | kind: ServiceAccount 24 | metadata: 25 | name: operator-service 26 | --- 27 | kind: ClusterRoleBinding 28 | apiVersion: rbac.authorization.k8s.io/v1 29 | metadata: 30 | name: operator-example 31 | subjects: 32 | - kind: ServiceAccount 33 | name: operator-service 34 | namespace: rustoperator 35 | roleRef: 36 | kind: ClusterRole 37 | name: operator-example 38 | apiGroup: rbac.authorization.k8s.io 39 | --- 40 | apiVersion: v1 41 | kind: Pod 42 | metadata: 43 | namespace: rustoperator 44 | name: rust-operator 45 | spec: 46 | serviceAccountName: operator-service 47 | containers: 48 | - name: custom-operator 49 | image: rust-operator:1c 50 | imagePullPolicy: Never 51 | -------------------------------------------------------------------------------- /log4rs.yml: -------------------------------------------------------------------------------- 1 | refresh_rate: 30 seconds 2 | appenders: 3 | stdout: 4 | kind: console 5 | root: 6 | level: info 7 | appenders: 8 | - stdout 9 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use futures::{StreamExt, TryStreamExt}; 2 | use k8s_openapi::api::core::v1::Pod; 3 | use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta; 4 | use k8s_openapi::serde_json; 5 | use kube::api::PostParams; 6 | use kube::{ 7 | api::{ListParams, WatchEvent}, 8 | client::Client, 9 | Api, Error, 10 | }; 11 | use log::{error, info}; 12 | use serde_json::json; 13 | 14 | static NAMESPACE: &str = "rustoperator"; 15 | static SIDECAR_IMAGE: &str = "hazelcast/hazelcast:4.2"; 16 | static SIDECAR_NAME_PREFIX: &str = "hazelcast-"; 17 | 18 | #[tokio::main] 19 | async fn main() -> Result<(), Error> { 20 | log4rs::init_file("log4rs.yml", Default::default()).unwrap(); 21 | let client = Client::try_default().await.unwrap(); 22 | let api: Api = Api::namespaced(client, NAMESPACE); 23 | let mut stream = api.watch(&ListParams::default(), "0").await?.boxed(); 24 | while let Some(event) = stream.try_next().await? { 25 | match event { 26 | WatchEvent::Added(pod) => { 27 | let namespace = pod.metadata.namespace.as_ref().unwrap(); 28 | if namespace == NAMESPACE && !is_sidecar(&pod) { 29 | if already_has_sidecar(&api, &pod).await { 30 | info!("Sidecar already existing for pod {}", name_of(&pod)) 31 | } else { 32 | create_sidecar(&api, &pod).await?; 33 | } 34 | } 35 | } 36 | WatchEvent::Deleted(pod) => { 37 | if is_assigned_sidecar(&pod) { 38 | let new_pod = Pod { 39 | metadata: ObjectMeta { 40 | resource_version: None, 41 | ..pod.metadata.clone() 42 | }, 43 | ..pod.clone() 44 | }; 45 | api.create(&PostParams::default(), &new_pod).await?; 46 | } 47 | info!("DELETED: {}", name_of(&pod)) 48 | } 49 | WatchEvent::Modified(pod) => info!("UPDATED: {}", name_of(&pod)), 50 | WatchEvent::Error(e) => error!("ERROR: {} {} ({})", e.code, e.message, e.status), 51 | _ => {} 52 | }; 53 | } 54 | info!("Controller finished successfully"); 55 | Ok(()) 56 | } 57 | 58 | fn is_sidecar(pod: &Pod) -> bool { 59 | match pod.metadata.annotations.as_ref() { 60 | Some(annotations) => match annotations.get("sidecar") { 61 | Some(value) => value == "true", 62 | None => false, 63 | }, 64 | None => false, 65 | } 66 | } 67 | 68 | async fn already_has_sidecar(api: &Api, pod: &Pod) -> bool { 69 | api.list(&ListParams::default()) 70 | .await 71 | .unwrap() 72 | .items 73 | .iter() 74 | .any(|p| name_of(pod) == SIDECAR_NAME_PREFIX.to_owned() + name_of(p)) 75 | } 76 | 77 | fn is_assigned_sidecar(pod: &Pod) -> bool { 78 | name_of(pod).starts_with(SIDECAR_NAME_PREFIX) 79 | && pod.metadata.owner_references.is_some() 80 | && pod 81 | .metadata 82 | .owner_references 83 | .as_ref() 84 | .unwrap() 85 | .iter() 86 | .any(|owner| owner.kind == "Pod" && owner.api_version == "v1") 87 | } 88 | 89 | async fn create_sidecar(api: &Api, owner: &Pod) -> Result { 90 | let owner_name = name_of(owner); 91 | let name = SIDECAR_NAME_PREFIX.to_owned() + owner_name; 92 | let manifest = json!({ 93 | "apiVersion": "v1", 94 | "kind": "Pod", 95 | "metadata": { 96 | "name": name, 97 | "namespace": NAMESPACE, 98 | "ownerReferences": [{ 99 | "apiVersion": "v1", 100 | "kind": "Pod", 101 | "name": owner_name, 102 | "uid": owner.metadata.uid.as_ref().unwrap(), 103 | }], 104 | "labels": {"sidecar": "true"} 105 | }, 106 | "spec": { 107 | "containers": [{ 108 | "name": name, 109 | "image": SIDECAR_IMAGE, 110 | }], 111 | }, 112 | }); 113 | let pod: Pod = serde_json::from_value(manifest)?; 114 | api.create(&PostParams::default(), &pod).await 115 | } 116 | 117 | fn name_of(pod: &Pod) -> &str { 118 | pod.metadata.name.as_ref().unwrap().as_str() 119 | } 120 | --------------------------------------------------------------------------------