From 25f4e2b2818960c2a59a4a7991a1aaefcf716830 Mon Sep 17 00:00:00 2001 From: Nick <10092581+NickLarsenNZ@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:38:52 +0100 Subject: [PATCH] chore: Version CRD (#661) * chore: migrate crd crate to operator-binary module * chore: add stackable-versioned dependency * chore: separate impls from crd data structures This makes way for the versioned module we will soon introduce * chore: version the crd At this point, errors will appear in any crates using the crd. It has only been done separately to illustrate the ease in versioning a CRD without all of the other necessary changes. * chore: version any other structures defined outside of the main crd This is helpful for later crd version sharing substructures that might not change. For example: v1alpha2::OpaCluster might still use user_info_fetcher::v1alpha1::Config, or perhaps it uses user_info_fetcher::v1beta1::Config. Similarly, shared structures from stackable-operators can then be versioned in the same way. * chore: update references in the crates The versioned module is imported rather than the individual structs and enums (when there is no conflict, eg: if also importing a versioned shared struct) so that that usages show the version explicitly. There might be times where this isn't possible, for example, once structs and enums are versioned in stackable-operator, there could be multiple modules with the same name. In this case, user-info-fetcher is also versioned with v1alpha1, so it is referred to as user_info_fetcher::v1alpha1 in crd/mod.rs so as to not conflict with the crds v1alpha1. * chore: add attribution Co-authored-by: Techassi * docs: Update references to include the version --------- Co-authored-by: Techassi --- Cargo.lock | 531 ++++-- Cargo.nix | 1616 ++++++++++++++--- Cargo.toml | 1 + crate-hashes.json | 3 + rust/crd/Cargo.toml | 18 - rust/crd/src/lib.rs | 373 ---- rust/crd/src/user_info_fetcher.rs | 137 -- rust/operator-binary/Cargo.toml | 3 +- rust/operator-binary/src/controller.rs | 107 +- rust/operator-binary/src/crd/mod.rs | 383 ++++ .../src/crd/user_info_fetcher.rs | 141 ++ rust/operator-binary/src/discovery.rs | 14 +- rust/operator-binary/src/lib.rs | 1 + rust/operator-binary/src/main.rs | 10 +- .../src/operations/graceful_shutdown.rs | 4 +- rust/operator-binary/src/product_logging.rs | 10 +- rust/user-info-fetcher/Cargo.toml | 2 +- .../user-info-fetcher/src/backend/keycloak.rs | 6 +- .../user-info-fetcher/src/backend/xfsc_aas.rs | 6 +- rust/user-info-fetcher/src/main.rs | 44 +- 20 files changed, 2366 insertions(+), 1044 deletions(-) delete mode 100644 rust/crd/Cargo.toml delete mode 100644 rust/crd/src/lib.rs delete mode 100644 rust/crd/src/user_info_fetcher.rs create mode 100644 rust/operator-binary/src/crd/mod.rs create mode 100644 rust/operator-binary/src/crd/user_info_fetcher.rs create mode 100644 rust/operator-binary/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 4b8b64fb..58287839 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,7 +24,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -158,18 +158,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "async-trait" -version = "0.1.85" +version = "0.1.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -244,7 +244,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom", + "getrandom 0.2.15", "instant", "rand", ] @@ -282,7 +282,7 @@ version = "0.71.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" dependencies = [ - "bitflags", + "bitflags 2.8.0", "cexpr", "clang-sys", "itertools", @@ -293,7 +293,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -311,6 +311,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.8.0" @@ -338,9 +344,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byteorder" @@ -350,15 +356,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "cc" -version = "1.2.10" +version = "1.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" dependencies = [ "jobserver", "libc", @@ -406,9 +412,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.27" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" +checksum = "3e77c3243bd94243c03672cb5154667347c457ca271254724f9f393aee1c05ff" dependencies = [ "clap_builder", "clap_derive", @@ -428,14 +434,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.24" +version = "4.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" +checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -479,6 +485,15 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -507,9 +522,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -530,7 +545,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96ea465841101b566a7d00627150a42762c4e9497ca4941856d93e1f8d7691ba" dependencies = [ "anyhow", - "bitflags", + "bitflags 2.8.0", "bytes", "libgssapi 0.8.2", "windows 0.58.0", @@ -591,7 +606,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -602,7 +617,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -613,7 +628,7 @@ checksum = "297806318ef30ad066b15792a8372858020ae3ca2e414ee6c2133b1eb9e9e945" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -643,7 +658,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -668,9 +683,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "feeef44e73baff3a26d371801df019877a9866a8c493d315ab00177843314f35" [[package]] name = "educe" @@ -681,7 +696,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -725,7 +740,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -804,6 +819,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fluent-uri" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "fnv" version = "1.0.7" @@ -896,7 +920,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -960,7 +984,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.13.3+wasi-0.2.2", + "windows-targets", ] [[package]] @@ -975,7 +1011,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ - "bitflags", + "bitflags 2.8.0", "libc", "libgit2-sys", "log", @@ -1007,6 +1043,16 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + [[package]] name = "hashbrown" version = "0.15.2" @@ -1110,9 +1156,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -1122,9 +1168,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -1366,7 +1412,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1403,7 +1449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", ] [[package]] @@ -1484,18 +1530,45 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "json-patch" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc" +dependencies = [ + "jsonptr 0.4.7", + "serde", + "serde_json", + "thiserror 1.0.69", +] + [[package]] name = "json-patch" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" dependencies = [ - "jsonptr", + "jsonptr 0.6.3", "serde", "serde_json", "thiserror 1.0.69", ] +[[package]] +name = "jsonpath-rust" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d8fe85bd70ff715f31ce8c739194b423d79811a19602115d611a3ec85d6200" +dependencies = [ + "lazy_static", + "once_cell", + "pest", + "pest_derive", + "regex", + "serde_json", + "thiserror 1.0.69", +] + [[package]] name = "jsonpath-rust" version = "0.7.5" @@ -1509,6 +1582,17 @@ dependencies = [ "thiserror 2.0.11", ] +[[package]] +name = "jsonptr" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627" +dependencies = [ + "fluent-uri", + "serde", + "serde_json", +] + [[package]] name = "jsonptr" version = "0.6.3" @@ -1519,6 +1603,20 @@ dependencies = [ "serde_json", ] +[[package]] +name = "k8s-openapi" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8847402328d8301354c94d605481f25a6bdc1ed65471fd96af8eca71141b13" +dependencies = [ + "base64 0.22.1", + "chrono", + "schemars", + "serde", + "serde-value", + "serde_json", +] + [[package]] name = "k8s-openapi" version = "0.24.0" @@ -1533,17 +1631,78 @@ dependencies = [ "serde_json", ] +[[package]] +name = "k8s-version" +version = "0.1.2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#048c7d8befddc2f2c6414444006871c95412d67c" +dependencies = [ + "darling", + "regex", + "snafu 0.8.5", +] + +[[package]] +name = "kube" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efffeb3df0bd4ef3e5d65044573499c0e4889b988070b08c50b25b1329289a1f" +dependencies = [ + "k8s-openapi 0.23.0", + "kube-client 0.96.0", + "kube-core 0.96.0", + "kube-derive 0.96.0", + "kube-runtime 0.96.0", +] + [[package]] name = "kube" version = "0.98.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32053dc495efad4d188c7b33cc7c02ef4a6e43038115348348876efd39a53cba" dependencies = [ - "k8s-openapi", - "kube-client", - "kube-core", - "kube-derive", - "kube-runtime", + "k8s-openapi 0.24.0", + "kube-client 0.98.0", + "kube-core 0.98.0", + "kube-derive 0.98.0", + "kube-runtime 0.98.0", +] + +[[package]] +name = "kube-client" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bf471ece8ff8d24735ce78dac4d091e9fcb8d74811aeb6b75de4d1c3f5de0f1" +dependencies = [ + "base64 0.22.1", + "bytes", + "chrono", + "either", + "futures", + "home", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-http-proxy", + "hyper-rustls", + "hyper-timeout", + "hyper-util", + "jsonpath-rust 0.5.1", + "k8s-openapi 0.23.0", + "kube-core 0.96.0", + "pem", + "rustls", + "rustls-pemfile", + "secrecy", + "serde", + "serde_json", + "serde_yaml", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tracing", ] [[package]] @@ -1566,9 +1725,9 @@ dependencies = [ "hyper-rustls", "hyper-timeout", "hyper-util", - "jsonpath-rust", - "k8s-openapi", - "kube-core", + "jsonpath-rust 0.7.5", + "k8s-openapi 0.24.0", + "kube-core 0.98.0", "pem", "rustls", "rustls-pemfile", @@ -1584,6 +1743,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "kube-core" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f42346d30bb34d1d7adc5c549b691bce7aa3a1e60254e68fab7e2d7b26fe3d77" +dependencies = [ + "chrono", + "form_urlencoded", + "http", + "json-patch 2.0.0", + "k8s-openapi 0.23.0", + "schemars", + "serde", + "serde-value", + "serde_json", + "thiserror 1.0.69", +] + [[package]] name = "kube-core" version = "0.98.0" @@ -1593,8 +1770,8 @@ dependencies = [ "chrono", "form_urlencoded", "http", - "json-patch", - "k8s-openapi", + "json-patch 3.0.1", + "k8s-openapi 0.24.0", "schemars", "serde", "serde-value", @@ -1602,6 +1779,19 @@ dependencies = [ "thiserror 2.0.11", ] +[[package]] +name = "kube-derive" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9364e04cc5e0482136c6ee8b7fb7551812da25802249f35b3def7aaa31e82ad" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.98", +] + [[package]] name = "kube-derive" version = "0.98.0" @@ -1612,7 +1802,35 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "kube-runtime" +version = "0.96.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fbf1f6ffa98e65f1d2a9a69338bb60605d46be7edf00237784b89e62c9bd44" +dependencies = [ + "ahash", + "async-broadcast", + "async-stream", + "async-trait", + "backoff", + "educe", + "futures", + "hashbrown 0.14.5", + "json-patch 2.0.0", + "jsonptr 0.4.7", + "k8s-openapi 0.23.0", + "kube-client 0.96.0", + "parking_lot", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.69", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -1628,12 +1846,12 @@ dependencies = [ "backoff", "educe", "futures", - "hashbrown", + "hashbrown 0.15.2", "hostname", - "json-patch", - "jsonptr", - "k8s-openapi", - "kube-client", + "json-patch 3.0.1", + "jsonptr 0.6.3", + "k8s-openapi 0.24.0", + "kube-client 0.98.0", "parking_lot", "pin-project", "serde", @@ -1710,7 +1928,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8663f3a3a93dd394b669dd9b213b457c5e0d2bc5a1b13a0950bd733c6fb6e37" dependencies = [ - "bitflags", + "bitflags 2.8.0", "bytes", "lazy_static", "libgssapi-sys", @@ -1722,7 +1940,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03365f6a6b3d4fddca9d442de420e16f0640bc869703eae329009a16cfc34a20" dependencies = [ - "bitflags", + "bitflags 2.8.0", "bytes", "lazy_static", "libgssapi-sys", @@ -1754,7 +1972,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags", + "bitflags 2.8.0", "libc", "redox_syscall", ] @@ -1861,7 +2079,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -1889,9 +2107,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" dependencies = [ "libc", "log", @@ -1966,11 +2184,11 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ - "bitflags", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -1987,7 +2205,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1998,9 +2216,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", @@ -2166,7 +2384,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2182,22 +2400,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e2ec53ad785f4d35dac0adea7f7dc6f1bb277ad84a680c7afefeae05d1f5916" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2246,7 +2464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" dependencies = [ "proc-macro2", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2310,7 +2528,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", ] [[package]] @@ -2319,7 +2537,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags", + "bitflags 2.8.0", ] [[package]] @@ -2418,7 +2636,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -2452,7 +2670,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -2461,9 +2679,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.21" +version = "0.23.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" dependencies = [ "log", "once_cell", @@ -2510,9 +2728,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" [[package]] name = "rustls-webpki" @@ -2533,9 +2751,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "schannel" @@ -2568,7 +2786,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2598,7 +2816,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags", + "bitflags 2.8.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -2611,7 +2829,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" dependencies = [ - "bitflags", + "bitflags 2.8.0", "core-foundation 0.10.0", "core-foundation-sys", "libc", @@ -2661,7 +2879,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2672,14 +2890,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2822,7 +3040,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2864,19 +3082,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "stackable-opa-crd" -version = "0.0.0-dev" -dependencies = [ - "semver", - "serde", - "serde_json", - "snafu 0.8.5", - "stackable-operator", - "strum", - "tracing", -] - [[package]] name = "stackable-opa-operator" version = "0.0.0-dev" @@ -2894,8 +3099,8 @@ dependencies = [ "serde", "serde_json", "snafu 0.8.5", - "stackable-opa-crd", "stackable-operator", + "stackable-versioned", "strum", "tokio", "tracing", @@ -2925,7 +3130,7 @@ dependencies = [ "serde", "serde_json", "snafu 0.8.5", - "stackable-opa-crd", + "stackable-opa-operator", "stackable-operator", "tokio", "tracing", @@ -2947,9 +3152,9 @@ dependencies = [ "either", "futures", "indexmap", - "json-patch", - "k8s-openapi", - "kube", + "json-patch 3.0.1", + "k8s-openapi 0.24.0", + "kube 0.98.0", "opentelemetry-jaeger", "opentelemetry_sdk", "product-config", @@ -2979,7 +3184,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2987,13 +3192,37 @@ name = "stackable-shared" version = "0.0.1" source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.85.0#59506c6202778889a27b6ae8153457e60a49c68d" dependencies = [ - "kube", + "kube 0.98.0", "semver", "serde", "serde_yaml", "snafu 0.8.5", ] +[[package]] +name = "stackable-versioned" +version = "0.5.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#048c7d8befddc2f2c6414444006871c95412d67c" +dependencies = [ + "stackable-versioned-macros", +] + +[[package]] +name = "stackable-versioned-macros" +version = "0.5.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#048c7d8befddc2f2c6414444006871c95412d67c" +dependencies = [ + "convert_case", + "darling", + "itertools", + "k8s-openapi 0.23.0", + "k8s-version", + "kube 0.96.0", + "proc-macro2", + "quote", + "syn 2.0.98", +] + [[package]] name = "strsim" version = "0.11.1" @@ -3019,7 +3248,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3041,9 +3270,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", @@ -3067,7 +3296,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3076,7 +3305,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags", + "bitflags 2.8.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -3110,13 +3339,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "38c246215d7d24f48ae091a2902398798e05d978b24315d6efbc00ede9a8bb91" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.3.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -3148,7 +3377,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3159,7 +3388,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3261,7 +3490,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3333,7 +3562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ "base64 0.22.1", - "bitflags", + "bitflags 2.8.0", "bytes", "http", "http-body", @@ -3388,7 +3617,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3481,9 +3710,15 @@ checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "unicode-ident" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" @@ -3535,11 +3770,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" dependencies = [ - "getrandom", + "getrandom 0.3.1", ] [[package]] @@ -3575,6 +3810,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -3597,7 +3841,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] @@ -3632,7 +3876,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3738,7 +3982,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3749,7 +3993,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3864,6 +4108,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags 2.8.0", +] + [[package]] name = "write16" version = "1.0.0" @@ -3913,7 +4166,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -3935,7 +4188,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -3955,7 +4208,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "synstructure", ] @@ -3984,5 +4237,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] diff --git a/Cargo.nix b/Cargo.nix index f8117b10..1faed953 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -47,16 +47,6 @@ rec { # File a bug if you depend on any for non-debug work! debug = internal.debugCrate { inherit packageId; }; }; - "stackable-opa-crd" = rec { - packageId = "stackable-opa-crd"; - build = internal.buildRustCrateWithFeatures { - packageId = "stackable-opa-crd"; - }; - - # Debug support which might change between releases. - # File a bug if you depend on any for non-debug work! - debug = internal.debugCrate { inherit packageId; }; - }; "stackable-opa-operator" = rec { packageId = "stackable-opa-operator"; build = internal.buildRustCrateWithFeatures { @@ -174,7 +164,7 @@ rec { } { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.2.15"; optional = true; } { @@ -515,7 +505,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" "visit-mut" ]; } ]; @@ -523,9 +513,9 @@ rec { }; "async-trait" = rec { crateName = "async-trait"; - version = "0.1.85"; + version = "0.1.86"; edition = "2021"; - sha256 = "0mm0gwad44zs7mna4a0m1z4dhzpmydfj73w4wm23c8xpnhrli4rz"; + sha256 = "17g7pk7fxbsf61hdbmf727q56bcqvdpjapxw5wd7gwvb114xfkb4"; procMacro = true; libName = "async_trait"; authors = [ @@ -542,7 +532,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "clone-impls" "full" "parsing" "printing" "proc-macro" "visit-mut" ]; } @@ -837,7 +827,7 @@ rec { dependencies = [ { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.2.15"; } { name = "instant"; @@ -960,7 +950,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "cexpr"; @@ -1012,7 +1002,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" "extra-traits" "visit-mut" ]; } ]; @@ -1066,7 +1056,22 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "bitflags" = rec { + "bitflags 1.3.2" = rec { + crateName = "bitflags"; + version = "1.3.2"; + edition = "2018"; + sha256 = "12ki6w8gn1ldq7yz9y680llwk5gmrhrzszaa17g1sbrw2r2qvwxy"; + authors = [ + "The Rust Project Developers" + ]; + features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; + }; + resolvedDefaultFeatures = [ "default" ]; + }; + "bitflags 2.8.0" = rec { crateName = "bitflags"; version = "2.8.0"; edition = "2021"; @@ -1135,9 +1140,9 @@ rec { }; "bumpalo" = rec { crateName = "bumpalo"; - version = "3.16.0"; + version = "3.17.0"; edition = "2021"; - sha256 = "0b015qb4knwanbdlp1x48pkb4pm57b8gidbhhhxr900q2wb6fabr"; + sha256 = "1gxxsn2fsjmv03g8p3m749mczv2k4m8xspifs5l7bcx0vx3gna0n"; authors = [ "Nick Fitzgerald " ]; @@ -1162,24 +1167,25 @@ rec { }; "bytes" = rec { crateName = "bytes"; - version = "1.9.0"; + version = "1.10.0"; edition = "2018"; - sha256 = "16ykzx24v1x4f42v2lxyvlczqhdfji3v7r4ghwckpwijzvb1hn9j"; + sha256 = "1ybcmdrlxrsrn7lnl0xrjg10j7zb4r01jjs5b2sqhrcwh62aq7gn"; authors = [ "Carl Lerche " "Sean McArthur " ]; features = { "default" = [ "std" ]; + "extra-platforms" = [ "dep:extra-platforms" ]; "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; }; "cc" = rec { crateName = "cc"; - version = "1.2.10"; + version = "1.2.12"; edition = "2018"; - sha256 = "0aaj2ivamhfzhgb9maasnfkh03s2mzhzpzwrkghgzbkfnv5qy80k"; + sha256 = "1lh3b4v7mk8yx7d63f3255zvvsjx12ck06izgyzm5i4yvskifmvm"; authors = [ "Alex Crichton " ]; @@ -1366,10 +1372,10 @@ rec { }; "clap" = rec { crateName = "clap"; - version = "4.5.27"; + version = "4.5.28"; edition = "2021"; crateBin = []; - sha256 = "15j720q1z953h1qxm2q5nwkmyhhl2vb45v017rqlhjrbk12h36vn"; + sha256 = "1zq53kp3lfcz9xr584i7r9bw8ivkcra53jvj6v046hnr7cjc6xry"; dependencies = [ { name = "clap_builder"; @@ -1398,6 +1404,7 @@ rec { "unicode" = [ "clap_builder/unicode" ]; "unstable-doc" = [ "clap_builder/unstable-doc" "derive" ]; "unstable-ext" = [ "clap_builder/unstable-ext" ]; + "unstable-markdown" = [ "clap_derive/unstable-markdown" ]; "unstable-styles" = [ "clap_builder/unstable-styles" ]; "unstable-v5" = [ "clap_builder/unstable-v5" "clap_derive?/unstable-v5" "deprecated" ]; "usage" = [ "clap_builder/usage" ]; @@ -1446,9 +1453,9 @@ rec { }; "clap_derive" = rec { crateName = "clap_derive"; - version = "4.5.24"; + version = "4.5.28"; edition = "2021"; - sha256 = "131ih3dm76srkbpfx7zfspp9b556zgzj31wqhl0ji2b39lcmbdsl"; + sha256 = "1vgigkhljp3r8r5lwdrn1ij93nafmjwh8cx77nppb9plqsaysk5z"; procMacro = true; dependencies = [ { @@ -1465,12 +1472,13 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; features = { "raw-deprecated" = [ "deprecated" ]; + "unstable-markdown" = [ "dep:pulldown-cmark" "dep:anstyle" ]; "unstable-v5" = [ "deprecated" ]; }; resolvedDefaultFeatures = [ "default" ]; @@ -1579,6 +1587,25 @@ rec { }; resolvedDefaultFeatures = [ "default" ]; }; + "convert_case" = rec { + crateName = "convert_case"; + version = "0.6.0"; + edition = "2018"; + sha256 = "1jn1pq6fp3rri88zyw6jlhwwgf6qiyc08d6gjv0qypgkl862n67c"; + authors = [ + "Rutrum " + ]; + dependencies = [ + { + name = "unicode-segmentation"; + packageId = "unicode-segmentation"; + } + ]; + features = { + "rand" = [ "dep:rand" ]; + "random" = [ "rand" ]; + }; + }; "core-foundation 0.10.0" = rec { crateName = "core-foundation"; version = "0.10.0"; @@ -1657,9 +1684,9 @@ rec { }; "cpufeatures" = rec { crateName = "cpufeatures"; - version = "0.2.16"; + version = "0.2.17"; edition = "2018"; - sha256 = "1hy466fkhxjbb16i7na95wz8yr14d0kd578pwzj5lbkz14jh5f0n"; + sha256 = "10023dnnaghhdl70xcds12fsx2b966sxbxjq5sxs49mvxqw5ivar"; authors = [ "RustCrypto Developers" ]; @@ -1667,21 +1694,25 @@ rec { { name = "libc"; packageId = "libc"; + usesDefaultFeatures = false; target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-linux-android"); } { name = "libc"; packageId = "libc"; + usesDefaultFeatures = false; target = { target, features }: (("aarch64" == target."arch" or null) && ("linux" == target."os" or null)); } { name = "libc"; packageId = "libc"; + usesDefaultFeatures = false; target = { target, features }: (("aarch64" == target."arch" or null) && ("apple" == target."vendor" or null)); } { name = "libc"; packageId = "libc"; + usesDefaultFeatures = false; target = { target, features }: (("loongarch64" == target."arch" or null) && ("linux" == target."os" or null)); } ]; @@ -1723,7 +1754,7 @@ rec { } { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "bytes"; @@ -1884,7 +1915,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" "extra-traits" ]; } ]; @@ -1914,7 +1945,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -1940,7 +1971,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" "visit-mut" ]; } ]; @@ -2027,7 +2058,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; features = { @@ -2085,9 +2116,9 @@ rec { }; "dyn-clone" = rec { crateName = "dyn-clone"; - version = "1.0.17"; + version = "1.0.18"; edition = "2018"; - sha256 = "09cig7dgg6jnqa10p4233nd8wllbjf4ffsw7wj0m4lwa5w3z0vhd"; + sha256 = "0dag651ph5q0mcax74y4m1k9hyl737q1v03isck3mzxsfd7g9vpy"; libName = "dyn_clone"; authors = [ "David Tolnay " @@ -2120,13 +2151,13 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; devDependencies = [ { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; @@ -2228,7 +2259,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; features = { @@ -2479,6 +2510,26 @@ rec { }; resolvedDefaultFeatures = [ "any_impl" "default" "miniz_oxide" "rust_backend" ]; }; + "fluent-uri" = rec { + crateName = "fluent-uri"; + version = "0.1.4"; + edition = "2021"; + sha256 = "03ah2qajw5l1zbc81kh1n8g7n24mfxbg6vqyv9ixipg1vglh9iqp"; + libName = "fluent_uri"; + authors = [ + "Scallop Ye " + ]; + dependencies = [ + { + name = "bitflags"; + packageId = "bitflags 1.3.2"; + } + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "std" ]; + }; "fnv" = rec { crateName = "fnv"; version = "1.0.7"; @@ -2717,7 +2768,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; @@ -2898,7 +2949,7 @@ rec { }; resolvedDefaultFeatures = [ "more_lengths" ]; }; - "getrandom" = rec { + "getrandom 0.2.15" = rec { crateName = "getrandom"; version = "0.2.15"; edition = "2018"; @@ -2919,7 +2970,7 @@ rec { } { name = "wasi"; - packageId = "wasi"; + packageId = "wasi 0.11.0+wasi-snapshot-preview1"; usesDefaultFeatures = false; target = { target, features }: ("wasi" == target."os" or null); } @@ -2934,6 +2985,84 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; + "getrandom 0.3.1" = rec { + crateName = "getrandom"; + version = "0.3.1"; + edition = "2021"; + sha256 = "1y154yzby383p63ndw6zpfm0fz3vf6c0zdwc7df6vkl150wrr923"; + authors = [ + "The Rand Project Developers" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: ((("linux" == target."os" or null) || ("android" == target."os" or null)) && (!(("custom" == target."getrandom_backend" or null) || ("rdrand" == target."getrandom_backend" or null) || ("rndr" == target."getrandom_backend" or null)))); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("dragonfly" == target."os" or null) || ("freebsd" == target."os" or null) || ("hurd" == target."os" or null) || ("illumos" == target."os" or null) || (("horizon" == target."os" or null) && ("arm" == target."arch" or null))); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("haiku" == target."os" or null) || ("redox" == target."os" or null) || ("nto" == target."os" or null) || ("aix" == target."os" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("ios" == target."os" or null) || ("visionos" == target."os" or null) || ("watchos" == target."os" or null) || ("tvos" == target."os" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("macos" == target."os" or null) || ("openbsd" == target."os" or null) || ("vita" == target."os" or null) || ("emscripten" == target."os" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: ("netbsd" == target."os" or null); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: ("solaris" == target."os" or null); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: ("vxworks" == target."os" or null); + } + { + name = "wasi"; + packageId = "wasi 0.13.3+wasi-0.2.2"; + usesDefaultFeatures = false; + target = { target, features }: (("wasm32" == target."arch" or null) && ("wasi" == target."os" or null) && ("p2" == target."env" or null)); + } + { + name = "windows-targets"; + packageId = "windows-targets"; + target = { target, features }: ((target."windows" or false) && (!("win7" == target."vendor" or null))); + } + ]; + features = { + "rustc-dep-of-std" = [ "dep:compiler_builtins" "dep:core" ]; + "wasm_js" = [ "dep:wasm-bindgen" "dep:js-sys" ]; + }; + }; "gimli" = rec { crateName = "gimli"; version = "0.31.1"; @@ -2963,7 +3092,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "libc"; @@ -3076,7 +3205,46 @@ rec { features = { }; }; - "hashbrown" = rec { + "hashbrown 0.14.5" = rec { + crateName = "hashbrown"; + version = "0.14.5"; + edition = "2021"; + sha256 = "1wa1vy1xs3mp11bn3z9dv0jricgr6a2j0zkf1g19yz3vw4il89z5"; + authors = [ + "Amanieu d'Antras " + ]; + dependencies = [ + { + name = "ahash"; + packageId = "ahash"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "allocator-api2"; + packageId = "allocator-api2"; + optional = true; + usesDefaultFeatures = false; + features = [ "alloc" ]; + } + ]; + features = { + "ahash" = [ "dep:ahash" ]; + "alloc" = [ "dep:alloc" ]; + "allocator-api2" = [ "dep:allocator-api2" ]; + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "default" = [ "ahash" "inline-more" "allocator-api2" ]; + "equivalent" = [ "dep:equivalent" ]; + "nightly" = [ "allocator-api2?/nightly" "bumpalo/allocator_api" ]; + "rayon" = [ "dep:rayon" ]; + "rkyv" = [ "dep:rkyv" ]; + "rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ]; + "serde" = [ "dep:serde" ]; + }; + resolvedDefaultFeatures = [ "ahash" "allocator-api2" "default" "inline-more" ]; + }; + "hashbrown 0.15.2" = rec { crateName = "hashbrown"; version = "0.15.2"; edition = "2021"; @@ -3340,9 +3508,9 @@ rec { }; "httparse" = rec { crateName = "httparse"; - version = "1.9.5"; + version = "1.10.0"; edition = "2018"; - sha256 = "0ip9v8m9lvgvq1lznl31wvn0ch1v254na7lhid9p29yx9rbx6wbx"; + sha256 = "0ahyh51rrpizd7m1jy5p791xfwn9cnmv0snd2q528h3i9vghimzj"; authors = [ "Sean McArthur " ]; @@ -3363,9 +3531,9 @@ rec { }; "hyper" = rec { crateName = "hyper"; - version = "1.5.2"; + version = "1.6.0"; edition = "2021"; - sha256 = "1q7akfb443yrjzkmnnbp2vs8zi15hgbk466rr4y144v4ppabhvr5"; + sha256 = "103ggny2k31z0iq2gzwk2vbx601wx6xkpjpxn40hr3p3b0b5fayc"; authors = [ "Sean McArthur " ]; @@ -4336,7 +4504,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -4417,7 +4585,7 @@ rec { } { name = "hashbrown"; - packageId = "hashbrown"; + packageId = "hashbrown 0.15.2"; usesDefaultFeatures = false; } ]; @@ -4528,6 +4696,7 @@ rec { "default" = [ "use_std" ]; "use_std" = [ "use_alloc" "either/use_std" ]; }; + resolvedDefaultFeatures = [ "default" "use_alloc" "use_std" ]; }; "itoa" = rec { crateName = "itoa"; @@ -4610,7 +4779,48 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "json-patch" = rec { + "json-patch 2.0.0" = rec { + crateName = "json-patch"; + version = "2.0.0"; + edition = "2021"; + sha256 = "1z1h6dyy4lx4z74yby2hvgl4jbm8mh5ymjp6fwcdkyi3923bh7sv"; + libName = "json_patch"; + authors = [ + "Ivan Dubrov " + ]; + dependencies = [ + { + name = "jsonptr"; + packageId = "jsonptr 0.4.7"; + } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "thiserror"; + packageId = "thiserror 1.0.69"; + } + ]; + devDependencies = [ + { + name = "serde_json"; + packageId = "serde_json"; + features = [ "preserve_order" ]; + } + ]; + features = { + "default" = [ "diff" ]; + "utoipa" = [ "dep:utoipa" ]; + }; + resolvedDefaultFeatures = [ "default" "diff" ]; + }; + "json-patch 3.0.1" = rec { crateName = "json-patch"; version = "3.0.1"; edition = "2021"; @@ -4622,7 +4832,7 @@ rec { dependencies = [ { name = "jsonptr"; - packageId = "jsonptr"; + packageId = "jsonptr 0.6.3"; } { name = "serde"; @@ -4651,7 +4861,48 @@ rec { }; resolvedDefaultFeatures = [ "default" "diff" ]; }; - "jsonpath-rust" = rec { + "jsonpath-rust 0.5.1" = rec { + crateName = "jsonpath-rust"; + version = "0.5.1"; + edition = "2018"; + sha256 = "0032bp43w6k1bl8h55m126cdf8xljj8p736f65gp3zvhpn2zxn0r"; + libName = "jsonpath_rust"; + authors = [ + "BorisZhguchev " + ]; + dependencies = [ + { + name = "lazy_static"; + packageId = "lazy_static"; + } + { + name = "once_cell"; + packageId = "once_cell"; + } + { + name = "pest"; + packageId = "pest"; + } + { + name = "pest_derive"; + packageId = "pest_derive"; + } + { + name = "regex"; + packageId = "regex"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "thiserror"; + packageId = "thiserror 1.0.69"; + } + ]; + + }; + "jsonpath-rust 0.7.5" = rec { crateName = "jsonpath-rust"; version = "0.7.5"; edition = "2021"; @@ -4684,46 +4935,136 @@ rec { ]; }; - "jsonptr" = rec { + "jsonptr 0.4.7" = rec { crateName = "jsonptr"; - version = "0.6.3"; + version = "0.4.7"; edition = "2021"; - sha256 = "0w6xkr6ns46nm3136x7www1dczz45y2bl9bsxmb2b6r3vlkjpsjx"; + sha256 = "09s6bqjlkd1m5z9hi9iwjimiri7wx3fd6d88hara0p27968m4vhw"; authors = [ "chance dinkins" - "André Sá de Mello " ]; dependencies = [ + { + name = "fluent-uri"; + packageId = "fluent-uri"; + optional = true; + usesDefaultFeatures = false; + } { name = "serde"; packageId = "serde"; - optional = true; + usesDefaultFeatures = false; features = [ "alloc" ]; } { name = "serde_json"; packageId = "serde_json"; - optional = true; + usesDefaultFeatures = false; features = [ "alloc" ]; } ]; features = { - "default" = [ "std" "serde" "json" "resolve" "assign" "delete" ]; - "delete" = [ "resolve" ]; - "json" = [ "dep:serde_json" "serde" ]; - "serde" = [ "dep:serde" ]; - "std" = [ "serde/std" "serde_json?/std" ]; - "syn" = [ "dep:syn" ]; - "toml" = [ "dep:toml" "serde" "std" ]; + "default" = [ "std" ]; + "fluent-uri" = [ "dep:fluent-uri" ]; + "std" = [ "serde/std" "serde_json/std" "fluent-uri?/std" ]; + "uniresid" = [ "dep:uniresid" ]; + "url" = [ "dep:url" ]; }; - resolvedDefaultFeatures = [ "assign" "default" "delete" "json" "resolve" "serde" "std" ]; + resolvedDefaultFeatures = [ "default" "std" ]; }; - "k8s-openapi" = rec { - crateName = "k8s-openapi"; - version = "0.24.0"; + "jsonptr 0.6.3" = rec { + crateName = "jsonptr"; + version = "0.6.3"; edition = "2021"; - links = "k8s-openapi-0.24.0"; - sha256 = "1m8ahw59g44kp9p4yd4ar0px15m2nyvhc5krbvqvw2ag6a8bjx9c"; + sha256 = "0w6xkr6ns46nm3136x7www1dczz45y2bl9bsxmb2b6r3vlkjpsjx"; + authors = [ + "chance dinkins" + "André Sá de Mello " + ]; + dependencies = [ + { + name = "serde"; + packageId = "serde"; + optional = true; + features = [ "alloc" ]; + } + { + name = "serde_json"; + packageId = "serde_json"; + optional = true; + features = [ "alloc" ]; + } + ]; + features = { + "default" = [ "std" "serde" "json" "resolve" "assign" "delete" ]; + "delete" = [ "resolve" ]; + "json" = [ "dep:serde_json" "serde" ]; + "serde" = [ "dep:serde" ]; + "std" = [ "serde/std" "serde_json?/std" ]; + "syn" = [ "dep:syn" ]; + "toml" = [ "dep:toml" "serde" "std" ]; + }; + resolvedDefaultFeatures = [ "assign" "default" "delete" "json" "resolve" "serde" "std" ]; + }; + "k8s-openapi 0.23.0" = rec { + crateName = "k8s-openapi"; + version = "0.23.0"; + edition = "2021"; + links = "k8s-openapi-0.23.0"; + sha256 = "04qv2iqwm3mgjvyp2m6n3vf6nnpjh5a60kf9ah9k1n184d04g24w"; + libName = "k8s_openapi"; + authors = [ + "Arnav Singh " + ]; + dependencies = [ + { + name = "base64"; + packageId = "base64 0.22.1"; + usesDefaultFeatures = false; + features = [ "alloc" ]; + } + { + name = "chrono"; + packageId = "chrono"; + usesDefaultFeatures = false; + features = [ "alloc" "serde" ]; + } + { + name = "schemars"; + packageId = "schemars"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "serde"; + packageId = "serde"; + usesDefaultFeatures = false; + } + { + name = "serde-value"; + packageId = "serde-value"; + usesDefaultFeatures = false; + } + { + name = "serde_json"; + packageId = "serde_json"; + usesDefaultFeatures = false; + features = [ "alloc" ]; + } + ]; + features = { + "earliest" = [ "v1_26" ]; + "latest" = [ "v1_31" ]; + "schemars" = [ "dep:schemars" ]; + }; + resolvedDefaultFeatures = [ "schemars" "v1_31" ]; + }; + "k8s-openapi 0.24.0" = rec { + crateName = "k8s-openapi"; + version = "0.24.0"; + edition = "2021"; + links = "k8s-openapi-0.24.0"; + sha256 = "1m8ahw59g44kp9p4yd4ar0px15m2nyvhc5krbvqvw2ag6a8bjx9c"; libName = "k8s_openapi"; authors = [ "Arnav Singh " @@ -4771,7 +5112,113 @@ rec { }; resolvedDefaultFeatures = [ "schemars" "v1_32" ]; }; - "kube" = rec { + "k8s-version" = rec { + crateName = "k8s-version"; + version = "0.1.2"; + edition = "2021"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "048c7d8befddc2f2c6414444006871c95412d67c"; + sha256 = "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6"; + }; + libName = "k8s_version"; + authors = [ + "Stackable GmbH " + ]; + dependencies = [ + { + name = "darling"; + packageId = "darling"; + optional = true; + } + { + name = "regex"; + packageId = "regex"; + } + { + name = "snafu"; + packageId = "snafu 0.8.5"; + } + ]; + features = { + "darling" = [ "dep:darling" ]; + }; + resolvedDefaultFeatures = [ "darling" ]; + }; + "kube 0.96.0" = rec { + crateName = "kube"; + version = "0.96.0"; + edition = "2021"; + sha256 = "07ws50li6nxja26b0w40k2dqir60k4s5fi2hsvjz6kmxy0yypzzg"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + } + { + name = "kube-client"; + packageId = "kube-client 0.96.0"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "kube-core"; + packageId = "kube-core 0.96.0"; + } + { + name = "kube-derive"; + packageId = "kube-derive 0.96.0"; + optional = true; + } + { + name = "kube-runtime"; + packageId = "kube-runtime 0.96.0"; + optional = true; + } + ]; + devDependencies = [ + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + features = [ "latest" ]; + } + ]; + features = { + "admission" = [ "kube-core/admission" ]; + "aws-lc-rs" = [ "kube-client?/aws-lc-rs" ]; + "client" = [ "kube-client/client" "config" ]; + "config" = [ "kube-client/config" ]; + "default" = [ "client" "rustls-tls" ]; + "derive" = [ "kube-derive" "kube-core/schema" ]; + "gzip" = [ "kube-client/gzip" "client" ]; + "http-proxy" = [ "kube-client/http-proxy" "client" ]; + "jsonpatch" = [ "kube-core/jsonpatch" ]; + "kube-client" = [ "dep:kube-client" ]; + "kube-derive" = [ "dep:kube-derive" ]; + "kube-runtime" = [ "dep:kube-runtime" ]; + "kubelet-debug" = [ "kube-client/kubelet-debug" "kube-core/kubelet-debug" ]; + "oauth" = [ "kube-client/oauth" "client" ]; + "oidc" = [ "kube-client/oidc" "client" ]; + "openssl-tls" = [ "kube-client/openssl-tls" "client" ]; + "runtime" = [ "kube-runtime" ]; + "rustls-tls" = [ "kube-client/rustls-tls" "client" ]; + "socks5" = [ "kube-client/socks5" "client" ]; + "unstable-client" = [ "kube-client/unstable-client" "client" ]; + "unstable-runtime" = [ "kube-runtime/unstable-runtime" "runtime" ]; + "webpki-roots" = [ "kube-client/webpki-roots" "client" ]; + "ws" = [ "kube-client/ws" "kube-core/ws" ]; + }; + resolvedDefaultFeatures = [ "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "runtime" "rustls-tls" ]; + }; + "kube 0.98.0" = rec { crateName = "kube"; version = "0.98.0"; edition = "2021"; @@ -4784,34 +5231,34 @@ rec { dependencies = [ { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; usesDefaultFeatures = false; } { name = "kube-client"; - packageId = "kube-client"; + packageId = "kube-client 0.98.0"; optional = true; usesDefaultFeatures = false; } { name = "kube-core"; - packageId = "kube-core"; + packageId = "kube-core 0.98.0"; } { name = "kube-derive"; - packageId = "kube-derive"; + packageId = "kube-derive 0.98.0"; optional = true; } { name = "kube-runtime"; - packageId = "kube-runtime"; + packageId = "kube-runtime 0.98.0"; optional = true; } ]; devDependencies = [ { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; usesDefaultFeatures = false; features = [ "latest" ]; } @@ -4843,11 +5290,11 @@ rec { }; resolvedDefaultFeatures = [ "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "runtime" "rustls-tls" ]; }; - "kube-client" = rec { + "kube-client 0.96.0" = rec { crateName = "kube-client"; - version = "0.98.0"; + version = "0.96.0"; edition = "2021"; - sha256 = "1jd06xwhnmzrzqrfwq7jlmmxl7dvaygmchjx363zmlgvrlwasd4x"; + sha256 = "1wg0blziqkfyfmmyn6l1fj6wp7qy156sr3g7birj93gzx3n73x4b"; libName = "kube_client"; authors = [ "clux " @@ -4934,17 +5381,17 @@ rec { } { name = "jsonpath-rust"; - packageId = "jsonpath-rust"; + packageId = "jsonpath-rust 0.5.1"; optional = true; } { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; usesDefaultFeatures = false; } { name = "kube-core"; - packageId = "kube-core"; + packageId = "kube-core 0.96.0"; } { name = "pem"; @@ -4982,7 +5429,7 @@ rec { } { name = "thiserror"; - packageId = "thiserror 2.0.11"; + packageId = "thiserror 1.0.69"; } { name = "tokio"; @@ -5022,14 +5469,9 @@ rec { usesDefaultFeatures = false; features = [ "async-await" ]; } - { - name = "hyper"; - packageId = "hyper"; - features = [ "server" ]; - } { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; usesDefaultFeatures = false; features = [ "latest" ]; } @@ -5090,12 +5532,12 @@ rec { }; resolvedDefaultFeatures = [ "__non_core" "base64" "bytes" "chrono" "client" "config" "either" "futures" "home" "http-body" "http-body-util" "hyper" "hyper-rustls" "hyper-timeout" "hyper-util" "jsonpatch" "jsonpath-rust" "pem" "rustls" "rustls-pemfile" "rustls-tls" "serde_yaml" "tokio" "tokio-util" "tower" "tower-http" "tracing" ]; }; - "kube-core" = rec { - crateName = "kube-core"; + "kube-client 0.98.0" = rec { + crateName = "kube-client"; version = "0.98.0"; edition = "2021"; - sha256 = "1wwnsn1wk7bd2jiv9iw8446j0bczagqv1lc4wy88l5wa505q7alp"; - libName = "kube_core"; + sha256 = "1jd06xwhnmzrzqrfwq7jlmmxl7dvaygmchjx363zmlgvrlwasd4x"; + libName = "kube_client"; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -5103,42 +5545,546 @@ rec { ]; dependencies = [ { - name = "chrono"; - packageId = "chrono"; + name = "base64"; + packageId = "base64 0.22.1"; + optional = true; + } + { + name = "bytes"; + packageId = "bytes"; + optional = true; + } + { + name = "chrono"; + packageId = "chrono"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "either"; + packageId = "either"; + optional = true; + } + { + name = "futures"; + packageId = "futures"; + optional = true; + usesDefaultFeatures = false; + features = [ "std" ]; + } + { + name = "home"; + packageId = "home"; + optional = true; + } + { + name = "http"; + packageId = "http"; + } + { + name = "http-body"; + packageId = "http-body"; + optional = true; + } + { + name = "http-body-util"; + packageId = "http-body-util"; + optional = true; + } + { + name = "hyper"; + packageId = "hyper"; + optional = true; + features = [ "client" "http1" ]; + } + { + name = "hyper-http-proxy"; + packageId = "hyper-http-proxy"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "hyper-rustls"; + packageId = "hyper-rustls"; + optional = true; + usesDefaultFeatures = false; + features = [ "http1" "logging" "native-tokio" "ring" "tls12" ]; + } + { + name = "hyper-timeout"; + packageId = "hyper-timeout"; + optional = true; + } + { + name = "hyper-util"; + packageId = "hyper-util"; + optional = true; + features = [ "client" "client-legacy" "http1" "tokio" ]; + } + { + name = "jsonpath-rust"; + packageId = "jsonpath-rust 0.7.5"; + optional = true; + } + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; + usesDefaultFeatures = false; + } + { + name = "kube-core"; + packageId = "kube-core 0.98.0"; + } + { + name = "pem"; + packageId = "pem"; + optional = true; + } + { + name = "rustls"; + packageId = "rustls"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "rustls-pemfile"; + packageId = "rustls-pemfile"; + optional = true; + } + { + name = "secrecy"; + packageId = "secrecy"; + } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "serde_yaml"; + packageId = "serde_yaml"; + optional = true; + } + { + name = "thiserror"; + packageId = "thiserror 2.0.11"; + } + { + name = "tokio"; + packageId = "tokio"; + optional = true; + features = [ "time" "signal" "sync" ]; + } + { + name = "tokio-util"; + packageId = "tokio-util"; + optional = true; + features = [ "io" "codec" ]; + } + { + name = "tower"; + packageId = "tower"; + optional = true; + features = [ "buffer" "filter" "util" ]; + } + { + name = "tower-http"; + packageId = "tower-http"; + optional = true; + features = [ "auth" "map-response-body" "trace" ]; + } + { + name = "tracing"; + packageId = "tracing"; + optional = true; + features = [ "log" ]; + } + ]; + devDependencies = [ + { + name = "futures"; + packageId = "futures"; + usesDefaultFeatures = false; + features = [ "async-await" ]; + } + { + name = "hyper"; + packageId = "hyper"; + features = [ "server" ]; + } + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; + usesDefaultFeatures = false; + features = [ "latest" ]; + } + { + name = "tokio"; + packageId = "tokio"; + features = [ "full" ]; + } + ]; + features = { + "__non_core" = [ "tracing" "serde_yaml" "base64" ]; + "admission" = [ "kube-core/admission" ]; + "aws-lc-rs" = [ "rustls?/aws-lc-rs" ]; + "base64" = [ "dep:base64" ]; + "bytes" = [ "dep:bytes" ]; + "chrono" = [ "dep:chrono" ]; + "client" = [ "config" "__non_core" "hyper" "hyper-util" "http-body" "http-body-util" "tower" "tower-http" "hyper-timeout" "chrono" "jsonpath-rust" "bytes" "futures" "tokio" "tokio-util" "either" ]; + "config" = [ "__non_core" "pem" "home" ]; + "default" = [ "client" ]; + "either" = [ "dep:either" ]; + "form_urlencoded" = [ "dep:form_urlencoded" ]; + "futures" = [ "dep:futures" ]; + "gzip" = [ "client" "tower-http/decompression-gzip" ]; + "home" = [ "dep:home" ]; + "http-body" = [ "dep:http-body" ]; + "http-body-util" = [ "dep:http-body-util" ]; + "http-proxy" = [ "hyper-http-proxy" ]; + "hyper" = [ "dep:hyper" ]; + "hyper-http-proxy" = [ "dep:hyper-http-proxy" ]; + "hyper-openssl" = [ "dep:hyper-openssl" ]; + "hyper-rustls" = [ "dep:hyper-rustls" ]; + "hyper-socks2" = [ "dep:hyper-socks2" ]; + "hyper-timeout" = [ "dep:hyper-timeout" ]; + "hyper-util" = [ "dep:hyper-util" ]; + "jsonpatch" = [ "kube-core/jsonpatch" ]; + "jsonpath-rust" = [ "dep:jsonpath-rust" ]; + "kubelet-debug" = [ "ws" "kube-core/kubelet-debug" ]; + "oauth" = [ "client" "tame-oauth" ]; + "oidc" = [ "client" "form_urlencoded" ]; + "openssl" = [ "dep:openssl" ]; + "openssl-tls" = [ "openssl" "hyper-openssl" ]; + "pem" = [ "dep:pem" ]; + "rand" = [ "dep:rand" ]; + "rustls" = [ "dep:rustls" ]; + "rustls-pemfile" = [ "dep:rustls-pemfile" ]; + "rustls-tls" = [ "rustls" "rustls-pemfile" "hyper-rustls" "hyper-http-proxy?/rustls-tls-native-roots" ]; + "serde_yaml" = [ "dep:serde_yaml" ]; + "socks5" = [ "hyper-socks2" ]; + "tame-oauth" = [ "dep:tame-oauth" ]; + "tokio" = [ "dep:tokio" ]; + "tokio-tungstenite" = [ "dep:tokio-tungstenite" ]; + "tokio-util" = [ "dep:tokio-util" ]; + "tower" = [ "dep:tower" ]; + "tower-http" = [ "dep:tower-http" ]; + "tracing" = [ "dep:tracing" ]; + "webpki-roots" = [ "hyper-rustls/webpki-roots" ]; + "ws" = [ "client" "tokio-tungstenite" "rand" "kube-core/ws" "tokio/macros" ]; + }; + resolvedDefaultFeatures = [ "__non_core" "base64" "bytes" "chrono" "client" "config" "either" "futures" "home" "http-body" "http-body-util" "hyper" "hyper-rustls" "hyper-timeout" "hyper-util" "jsonpatch" "jsonpath-rust" "pem" "rustls" "rustls-pemfile" "rustls-tls" "serde_yaml" "tokio" "tokio-util" "tower" "tower-http" "tracing" ]; + }; + "kube-core 0.96.0" = rec { + crateName = "kube-core"; + version = "0.96.0"; + edition = "2021"; + sha256 = "0xrxzqk7nbbymf7ycm02wshs6ynf3dlrnm2wvix1skdk1g9lc8zl"; + libName = "kube_core"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "chrono"; + packageId = "chrono"; + usesDefaultFeatures = false; + features = [ "now" ]; + } + { + name = "form_urlencoded"; + packageId = "form_urlencoded"; + } + { + name = "http"; + packageId = "http"; + } + { + name = "json-patch"; + packageId = "json-patch 2.0.0"; + optional = true; + } + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + } + { + name = "schemars"; + packageId = "schemars"; + optional = true; + } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + { + name = "serde-value"; + packageId = "serde-value"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "thiserror"; + packageId = "thiserror 1.0.69"; + } + ]; + devDependencies = [ + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + features = [ "latest" ]; + } + ]; + features = { + "admission" = [ "json-patch" ]; + "json-patch" = [ "dep:json-patch" ]; + "jsonpatch" = [ "json-patch" ]; + "kubelet-debug" = [ "ws" ]; + "schema" = [ "schemars" ]; + "schemars" = [ "dep:schemars" ]; + }; + resolvedDefaultFeatures = [ "json-patch" "jsonpatch" "schema" "schemars" ]; + }; + "kube-core 0.98.0" = rec { + crateName = "kube-core"; + version = "0.98.0"; + edition = "2021"; + sha256 = "1wwnsn1wk7bd2jiv9iw8446j0bczagqv1lc4wy88l5wa505q7alp"; + libName = "kube_core"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "chrono"; + packageId = "chrono"; + usesDefaultFeatures = false; + features = [ "now" ]; + } + { + name = "form_urlencoded"; + packageId = "form_urlencoded"; + } + { + name = "http"; + packageId = "http"; + } + { + name = "json-patch"; + packageId = "json-patch 3.0.1"; + optional = true; + } + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; + usesDefaultFeatures = false; + } + { + name = "schemars"; + packageId = "schemars"; + optional = true; + } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } + { + name = "serde-value"; + packageId = "serde-value"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "thiserror"; + packageId = "thiserror 2.0.11"; + } + ]; + devDependencies = [ + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; + usesDefaultFeatures = false; + features = [ "latest" ]; + } + ]; + features = { + "admission" = [ "json-patch" ]; + "json-patch" = [ "dep:json-patch" ]; + "jsonpatch" = [ "json-patch" ]; + "kubelet-debug" = [ "ws" ]; + "schema" = [ "schemars" ]; + "schemars" = [ "dep:schemars" ]; + }; + resolvedDefaultFeatures = [ "json-patch" "jsonpatch" "schema" "schemars" ]; + }; + "kube-derive 0.96.0" = rec { + crateName = "kube-derive"; + version = "0.96.0"; + edition = "2021"; + sha256 = "1bc23sismxyyncsry902b2i2v0aifpxvgs3fdh9q412yrh24wdpr"; + procMacro = true; + libName = "kube_derive"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "darling"; + packageId = "darling"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "syn"; + packageId = "syn 2.0.98"; + features = [ "extra-traits" ]; + } + ]; + + }; + "kube-derive 0.98.0" = rec { + crateName = "kube-derive"; + version = "0.98.0"; + edition = "2021"; + sha256 = "0n46p76pvm3plsnbm57c2j76r1i6hwslxsaj345pxdvn8255sx1p"; + procMacro = true; + libName = "kube_derive"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "darling"; + packageId = "darling"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "serde_json"; + packageId = "serde_json"; + } + { + name = "syn"; + packageId = "syn 2.0.98"; + features = [ "extra-traits" ]; + } + ]; + + }; + "kube-runtime 0.96.0" = rec { + crateName = "kube-runtime"; + version = "0.96.0"; + edition = "2021"; + sha256 = "0i5xr5i9xf44fwih1pvypr35sq30pcw979m9sbqnb3m9zzvg3yyk"; + libName = "kube_runtime"; + authors = [ + "clux " + "Natalie Klestrup Röijezon " + "kazk " + ]; + dependencies = [ + { + name = "ahash"; + packageId = "ahash"; + } + { + name = "async-broadcast"; + packageId = "async-broadcast"; + } + { + name = "async-stream"; + packageId = "async-stream"; + } + { + name = "async-trait"; + packageId = "async-trait"; + } + { + name = "backoff"; + packageId = "backoff"; + } + { + name = "educe"; + packageId = "educe"; usesDefaultFeatures = false; - features = [ "now" ]; + features = [ "Clone" "Debug" "Hash" "PartialEq" ]; } { - name = "form_urlencoded"; - packageId = "form_urlencoded"; + name = "futures"; + packageId = "futures"; + usesDefaultFeatures = false; + features = [ "async-await" ]; } { - name = "http"; - packageId = "http"; + name = "hashbrown"; + packageId = "hashbrown 0.14.5"; } { name = "json-patch"; - packageId = "json-patch"; - optional = true; + packageId = "json-patch 2.0.0"; + } + { + name = "jsonptr"; + packageId = "jsonptr 0.4.7"; } { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; usesDefaultFeatures = false; } { - name = "schemars"; - packageId = "schemars"; - optional = true; + name = "kube-client"; + packageId = "kube-client 0.96.0"; + usesDefaultFeatures = false; + features = [ "jsonpatch" "client" ]; } { - name = "serde"; - packageId = "serde"; - features = [ "derive" ]; + name = "parking_lot"; + packageId = "parking_lot"; } { - name = "serde-value"; - packageId = "serde-value"; + name = "pin-project"; + packageId = "pin-project"; + } + { + name = "serde"; + packageId = "serde"; } { name = "serde_json"; @@ -5146,65 +6092,45 @@ rec { } { name = "thiserror"; - packageId = "thiserror 2.0.11"; + packageId = "thiserror 1.0.69"; } - ]; - devDependencies = [ { - name = "k8s-openapi"; - packageId = "k8s-openapi"; - usesDefaultFeatures = false; - features = [ "latest" ]; + name = "tokio"; + packageId = "tokio"; + features = [ "time" ]; } - ]; - features = { - "admission" = [ "json-patch" ]; - "json-patch" = [ "dep:json-patch" ]; - "jsonpatch" = [ "json-patch" ]; - "kubelet-debug" = [ "ws" ]; - "schema" = [ "schemars" ]; - "schemars" = [ "dep:schemars" ]; - }; - resolvedDefaultFeatures = [ "json-patch" "jsonpatch" "schema" "schemars" ]; - }; - "kube-derive" = rec { - crateName = "kube-derive"; - version = "0.98.0"; - edition = "2021"; - sha256 = "0n46p76pvm3plsnbm57c2j76r1i6hwslxsaj345pxdvn8255sx1p"; - procMacro = true; - libName = "kube_derive"; - authors = [ - "clux " - "Natalie Klestrup Röijezon " - "kazk " - ]; - dependencies = [ { - name = "darling"; - packageId = "darling"; + name = "tokio-util"; + packageId = "tokio-util"; + features = [ "time" ]; } { - name = "proc-macro2"; - packageId = "proc-macro2"; + name = "tracing"; + packageId = "tracing"; } + ]; + devDependencies = [ { - name = "quote"; - packageId = "quote"; + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + features = [ "latest" ]; } { name = "serde_json"; packageId = "serde_json"; } { - name = "syn"; - packageId = "syn 2.0.96"; - features = [ "extra-traits" ]; + name = "tokio"; + packageId = "tokio"; + features = [ "full" "test-util" ]; } ]; - + features = { + "unstable-runtime" = [ "unstable-runtime-subscribe" "unstable-runtime-stream-control" "unstable-runtime-reconcile-on" ]; + }; }; - "kube-runtime" = rec { + "kube-runtime 0.98.0" = rec { crateName = "kube-runtime"; version = "0.98.0"; edition = "2021"; @@ -5250,7 +6176,7 @@ rec { } { name = "hashbrown"; - packageId = "hashbrown"; + packageId = "hashbrown 0.15.2"; } { name = "hostname"; @@ -5258,20 +6184,20 @@ rec { } { name = "json-patch"; - packageId = "json-patch"; + packageId = "json-patch 3.0.1"; } { name = "jsonptr"; - packageId = "jsonptr"; + packageId = "jsonptr 0.6.3"; } { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; usesDefaultFeatures = false; } { name = "kube-client"; - packageId = "kube-client"; + packageId = "kube-client 0.98.0"; usesDefaultFeatures = false; features = [ "jsonpatch" "client" ]; } @@ -5313,7 +6239,7 @@ rec { devDependencies = [ { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; usesDefaultFeatures = false; features = [ "latest" ]; } @@ -5550,7 +6476,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "bytes"; @@ -5581,7 +6507,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "bytes"; @@ -5656,7 +6582,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "libc"; @@ -5974,7 +6900,7 @@ rec { } { name = "wasi"; - packageId = "wasi"; + packageId = "wasi 0.11.0+wasi-snapshot-preview1"; target = { target, features }: ("wasi" == target."os" or null); } { @@ -6077,9 +7003,9 @@ rec { }; "native-tls" = rec { crateName = "native-tls"; - version = "0.2.12"; + version = "0.2.13"; edition = "2015"; - sha256 = "0rkl65z70n7sy4d5w0qa99klg1hr43wx6kcprk4d2n9xr2r4wqd8"; + sha256 = "0v0rafrzmr5dcnizvj8awa1s8rbgzc394zfq9n7dzmahw3w5kaqd"; libName = "native_tls"; authors = [ "Steven Fackler " @@ -6306,16 +7232,16 @@ rec { }; "openssl" = rec { crateName = "openssl"; - version = "0.10.68"; + version = "0.10.70"; edition = "2021"; - sha256 = "1xbiz2bmba2fibg70s462yk2fndp3f9vz11c7iw0ilh2y54bqx31"; + sha256 = "1ij21wa5hzip17v91gl9x3n4h0am10ivq065andqrfx8cvhv9kv1"; authors = [ "Steven Fackler " ]; dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "cfg-if"; @@ -6368,7 +7294,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; @@ -6387,10 +7313,10 @@ rec { }; "openssl-sys" = rec { crateName = "openssl-sys"; - version = "0.9.104"; + version = "0.9.105"; edition = "2021"; links = "openssl"; - sha256 = "0hf712xcxmycnlc09r8d446b3mwqchsbfrjv374fp7grrc3g7as5"; + sha256 = "1p59q259h73w58fgajyd588hzaj9r3vp3jy78xlqsnp09fwda8lb"; build = "build/main.rs"; libName = "openssl_sys"; authors = [ @@ -6966,7 +7892,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; features = { @@ -7009,9 +7935,9 @@ rec { }; "pin-project" = rec { crateName = "pin-project"; - version = "1.1.8"; + version = "1.1.9"; edition = "2021"; - sha256 = "05jr3xfy1spgmz3q19l4mmvv46vgvkvsgphamifx7x45swxcabhy"; + sha256 = "0z9jgkcqg00fxjrbbcjlkiy940hbf5gp5gq6jiq0gzki2hgfgqnz"; libName = "pin_project"; dependencies = [ { @@ -7023,9 +7949,9 @@ rec { }; "pin-project-internal" = rec { crateName = "pin-project-internal"; - version = "1.1.8"; + version = "1.1.9"; edition = "2021"; - sha256 = "1yzfhf6l27nhzv7r5hfrwj2g0x7xmfhgil19fj9am4srqp06csnm"; + sha256 = "0rzsqcf4mdrpx39w6wvw3wjjc3y9mgmy6irwnq548l5xwpk5ks7n"; procMacro = true; libName = "pin_project_internal"; dependencies = [ @@ -7039,7 +7965,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "parsing" "printing" "clone-impls" "proc-macro" "full" "visit-mut" ]; } @@ -7141,7 +8067,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "full" ]; } @@ -7154,7 +8080,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "clone-impls" "extra-traits" "parsing" "printing" "visit-mut" ]; } @@ -7347,7 +8273,7 @@ rec { dependencies = [ { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.2.15"; optional = true; } ]; @@ -7371,7 +8297,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } ]; features = { @@ -7863,7 +8789,7 @@ rec { } { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.2.15"; } { name = "libc"; @@ -7966,7 +8892,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; usesDefaultFeatures = false; } { @@ -8067,9 +8993,9 @@ rec { }; "rustls" = rec { crateName = "rustls"; - version = "0.23.21"; + version = "0.23.22"; edition = "2021"; - sha256 = "1f75gicypi40bdq20h1rglwaapr3ifnchgf697clkxibc0j7ja4g"; + sha256 = "19qvd1digcidv245qk8mkfjibmzvp3irdc0x6915wsgbnhx2dfcz"; dependencies = [ { name = "log"; @@ -8125,6 +9051,7 @@ rec { "hashbrown" = [ "dep:hashbrown" ]; "log" = [ "dep:log" ]; "logging" = [ "log" ]; + "prefer-post-quantum" = [ "aws_lc_rs" ]; "read_buf" = [ "rustversion" "std" ]; "ring" = [ "dep:ring" "webpki/ring" ]; "rustversion" = [ "dep:rustversion" ]; @@ -8219,9 +9146,9 @@ rec { }; "rustls-pki-types" = rec { crateName = "rustls-pki-types"; - version = "1.10.1"; + version = "1.11.0"; edition = "2021"; - sha256 = "0dqb3d0cbld1yrp084wyzgw6yk3qzzic8l5pbs1b6bcjzzk4ggyj"; + sha256 = "0755isc0x5iymm3wsn59s0ad1pm9zidw7p34qfqlsjsac9jf4z4i"; libName = "rustls_pki_types"; features = { "default" = [ "alloc" ]; @@ -8278,9 +9205,9 @@ rec { }; "ryu" = rec { crateName = "ryu"; - version = "1.0.18"; + version = "1.0.19"; edition = "2018"; - sha256 = "17xx2s8j1lln7iackzd9p0sv546vjq71i779gphjq923vjh5pjzk"; + sha256 = "1pg6a0b80m32ahygsdkwzs3bfydk4snw695akz4rqxj4lv8a58bf"; authors = [ "David Tolnay " ]; @@ -8403,7 +9330,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "extra-traits" ]; } ]; @@ -8465,7 +9392,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "core-foundation"; @@ -8512,7 +9439,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "core-foundation"; @@ -8668,7 +9595,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" "proc-macro" ]; } @@ -8700,7 +9627,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" ]; } @@ -8709,9 +9636,9 @@ rec { }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.137"; + version = "1.0.138"; edition = "2021"; - sha256 = "0sql0gndrw2miw440sl0m2lrk6bsxyxrmlnpma52k6dzd9pgn34k"; + sha256 = "0j99hyp2plvdcyrfzdz0875d0dm04q5ngsd7dr5fk1x7glp1jd6l"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -9120,7 +10047,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; @@ -9256,49 +10183,6 @@ rec { } ]; - }; - "stackable-opa-crd" = rec { - crateName = "stackable-opa-crd"; - version = "0.0.0-dev"; - edition = "2021"; - src = lib.cleanSourceWith { filter = sourceFilter; src = ./rust/crd; }; - libName = "stackable_opa_crd"; - authors = [ - "Stackable GmbH " - ]; - dependencies = [ - { - name = "semver"; - packageId = "semver"; - } - { - name = "serde"; - packageId = "serde"; - features = [ "derive" ]; - } - { - name = "serde_json"; - packageId = "serde_json"; - } - { - name = "snafu"; - packageId = "snafu 0.8.5"; - } - { - name = "stackable-operator"; - packageId = "stackable-operator"; - } - { - name = "strum"; - packageId = "strum"; - features = [ "derive" ]; - } - { - name = "tracing"; - packageId = "tracing"; - } - ]; - }; "stackable-opa-operator" = rec { crateName = "stackable-opa-operator"; @@ -9312,6 +10196,7 @@ rec { } ]; src = lib.cleanSourceWith { filter = sourceFilter; src = ./rust/operator-binary; }; + libName = "stackable_opa_operator"; authors = [ "Stackable GmbH " ]; @@ -9365,14 +10250,15 @@ rec { name = "snafu"; packageId = "snafu 0.8.5"; } - { - name = "stackable-opa-crd"; - packageId = "stackable-opa-crd"; - } { name = "stackable-operator"; packageId = "stackable-operator"; } + { + name = "stackable-versioned"; + packageId = "stackable-versioned"; + features = [ "k8s" ]; + } { name = "strum"; packageId = "strum"; @@ -9493,8 +10379,8 @@ rec { packageId = "snafu 0.8.5"; } { - name = "stackable-opa-crd"; - packageId = "stackable-opa-crd"; + name = "stackable-opa-operator"; + packageId = "stackable-opa-operator"; } { name = "stackable-operator"; @@ -9577,17 +10463,17 @@ rec { } { name = "json-patch"; - packageId = "json-patch"; + packageId = "json-patch 3.0.1"; } { name = "k8s-openapi"; - packageId = "k8s-openapi"; + packageId = "k8s-openapi 0.24.0"; usesDefaultFeatures = false; features = [ "schemars" "v1_32" ]; } { name = "kube"; - packageId = "kube"; + packageId = "kube 0.98.0"; usesDefaultFeatures = false; features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" ]; } @@ -9710,7 +10596,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -9732,7 +10618,7 @@ rec { dependencies = [ { name = "kube"; - packageId = "kube"; + packageId = "kube 0.98.0"; usesDefaultFeatures = false; features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" ]; } @@ -9756,6 +10642,106 @@ rec { ]; }; + "stackable-versioned" = rec { + crateName = "stackable-versioned"; + version = "0.5.0"; + edition = "2021"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "048c7d8befddc2f2c6414444006871c95412d67c"; + sha256 = "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6"; + }; + libName = "stackable_versioned"; + authors = [ + "Stackable GmbH " + ]; + dependencies = [ + { + name = "stackable-versioned-macros"; + packageId = "stackable-versioned-macros"; + } + ]; + features = { + "full" = [ "k8s" ]; + "k8s" = [ "stackable-versioned-macros/k8s" ]; + }; + resolvedDefaultFeatures = [ "k8s" ]; + }; + "stackable-versioned-macros" = rec { + crateName = "stackable-versioned-macros"; + version = "0.5.0"; + edition = "2021"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "048c7d8befddc2f2c6414444006871c95412d67c"; + sha256 = "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6"; + }; + procMacro = true; + libName = "stackable_versioned_macros"; + authors = [ + "Stackable GmbH " + ]; + dependencies = [ + { + name = "convert_case"; + packageId = "convert_case"; + } + { + name = "darling"; + packageId = "darling"; + } + { + name = "itertools"; + packageId = "itertools"; + } + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + optional = true; + usesDefaultFeatures = false; + features = [ "schemars" "v1_31" ]; + } + { + name = "k8s-version"; + packageId = "k8s-version"; + features = [ "darling" ]; + } + { + name = "kube"; + packageId = "kube 0.96.0"; + optional = true; + usesDefaultFeatures = false; + features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" ]; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.98"; + } + ]; + devDependencies = [ + { + name = "k8s-openapi"; + packageId = "k8s-openapi 0.23.0"; + usesDefaultFeatures = false; + features = [ "schemars" "v1_31" ]; + } + ]; + features = { + "full" = [ "k8s" ]; + "k8s" = [ "dep:kube" "dep:k8s-openapi" ]; + }; + resolvedDefaultFeatures = [ "k8s" ]; + }; "strsim" = rec { crateName = "strsim"; version = "0.11.1"; @@ -9824,7 +10810,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "parsing" "extra-traits" ]; } ]; @@ -9877,11 +10863,11 @@ rec { }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" ]; }; - "syn 2.0.96" = rec { + "syn 2.0.98" = rec { crateName = "syn"; - version = "2.0.96"; + version = "2.0.98"; edition = "2021"; - sha256 = "102wk3cgawimi3i0q3r3xw3i858zkyingg6y7gsxfy733amsvl6m"; + sha256 = "1cfk0qqbl4fbr3dz61nw21d5amvl4rym6nxwnfsw43mf90d7y51n"; authors = [ "David Tolnay " ]; @@ -9953,7 +10939,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "derive" "parsing" "printing" "clone-impls" "visit" "extra-traits" ]; } @@ -9976,7 +10962,7 @@ rec { dependencies = [ { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "core-foundation"; @@ -10053,9 +11039,9 @@ rec { }; "tempfile" = rec { crateName = "tempfile"; - version = "3.15.0"; + version = "3.16.0"; edition = "2021"; - sha256 = "016pmkbwn3shas44gcwq1kc9lajalb90qafhiip5fvv8h6f5b2ls"; + sha256 = "14dvm3lys05wxzb1ahxjg3chb3krk0ir18liw25g893xblhldhiq"; authors = [ "Steven Allen " "The Rust Project Developers" @@ -10073,7 +11059,7 @@ rec { } { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.3.1"; optional = true; usesDefaultFeatures = false; target = { target, features }: ((target."unix" or false) || (target."windows" or false) || ("wasi" == target."os" or null)); @@ -10159,7 +11145,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -10185,7 +11171,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -10540,7 +11526,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } ]; @@ -10842,7 +11828,7 @@ rec { } { name = "bitflags"; - packageId = "bitflags"; + packageId = "bitflags 2.8.0"; } { name = "bytes"; @@ -11060,7 +12046,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "full" "parsing" "printing" "visit-mut" "clone-impls" "extra-traits" "proc-macro" ]; } @@ -11425,15 +12411,28 @@ rec { }; "unicode-ident" = rec { crateName = "unicode-ident"; - version = "1.0.15"; + version = "1.0.16"; edition = "2018"; - sha256 = "0hr2b72jf9zb5avd2k6p7rbwkjjgl21vdhd90114kihp5ghqik8i"; + sha256 = "0d2hji0i16naw43l02dplrz8fbv625n7475s463iqw4by1hd2452"; libName = "unicode_ident"; authors = [ "David Tolnay " ]; }; + "unicode-segmentation" = rec { + crateName = "unicode-segmentation"; + version = "1.12.0"; + edition = "2018"; + sha256 = "14qla2jfx74yyb9ds3d2mpwpa4l4lzb9z57c6d2ba511458z5k7n"; + libName = "unicode_segmentation"; + authors = [ + "kwantam " + "Manish Goregaokar " + ]; + features = { + }; + }; "unicode-xid" = rec { crateName = "unicode-xid"; version = "0.2.6"; @@ -11554,9 +12553,9 @@ rec { }; "uuid" = rec { crateName = "uuid"; - version = "1.12.1"; + version = "1.13.1"; edition = "2018"; - sha256 = "0jxdmn94164g5yj9k152k5a47fysrz1f5dzrr1nbjaqrd1g8yxdk"; + sha256 = "1l6cdln80l288dj5pgc44fsbc8xabyadxy37da9p6cq8psj7rn6f"; authors = [ "Ashley Mannix" "Dylan DPC" @@ -11565,8 +12564,9 @@ rec { dependencies = [ { name = "getrandom"; - packageId = "getrandom"; + packageId = "getrandom 0.3.1"; optional = true; + target = { target, features }: (!(("wasm32" == target."arch" or null) && ("unknown" == target."vendor" or null) && ("unknown" == target."os" or null))); } ]; features = { @@ -11576,13 +12576,16 @@ rec { "bytemuck" = [ "dep:bytemuck" ]; "default" = [ "std" ]; "fast-rng" = [ "rng" "dep:rand" ]; - "js" = [ "dep:wasm-bindgen" "getrandom?/js" ]; + "js" = [ "dep:wasm-bindgen" "dep:js-sys" ]; "macro-diagnostics" = [ "dep:uuid-macro-internal" ]; "md5" = [ "dep:md-5" ]; "rng" = [ "dep:getrandom" ]; + "rng-getrandom" = [ "rng" "dep:getrandom" "uuid-rng-internal-lib" "uuid-rng-internal-lib/getrandom" ]; + "rng-rand" = [ "rng" "dep:rand" "uuid-rng-internal-lib" "uuid-rng-internal-lib/rand" ]; "serde" = [ "dep:serde" ]; "sha1" = [ "dep:sha1_smol" ]; "slog" = [ "dep:slog" ]; + "uuid-rng-internal-lib" = [ "dep:uuid-rng-internal-lib" ]; "v1" = [ "atomic" ]; "v3" = [ "md5" ]; "v4" = [ "rng" ]; @@ -11642,7 +12645,7 @@ rec { ]; }; - "wasi" = rec { + "wasi 0.11.0+wasi-snapshot-preview1" = rec { crateName = "wasi"; version = "0.11.0+wasi-snapshot-preview1"; edition = "2018"; @@ -11659,6 +12662,29 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; + "wasi 0.13.3+wasi-0.2.2" = rec { + crateName = "wasi"; + version = "0.13.3+wasi-0.2.2"; + edition = "2021"; + sha256 = "1lnapbvdcvi3kc749wzqvwrpd483win2kicn1faa4dja38p6v096"; + authors = [ + "The Cranelift Project Developers" + ]; + dependencies = [ + { + name = "wit-bindgen-rt"; + packageId = "wit-bindgen-rt"; + features = [ "bitflags" ]; + } + ]; + features = { + "compiler_builtins" = [ "dep:compiler_builtins" ]; + "core" = [ "dep:core" ]; + "default" = [ "std" ]; + "rustc-dep-of-std" = [ "compiler_builtins" "core" "rustc-std-workspace-alloc" ]; + "rustc-std-workspace-alloc" = [ "dep:rustc-std-workspace-alloc" ]; + }; + }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; version = "0.2.100"; @@ -11735,7 +12761,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "full" ]; } { @@ -11836,7 +12862,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "visit" "visit-mut" "full" ]; } { @@ -13888,7 +14914,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "parsing" "proc-macro" "printing" "full" "derive" ]; } @@ -13916,7 +14942,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; usesDefaultFeatures = false; features = [ "parsing" "proc-macro" "printing" "full" "derive" "clone-impls" ]; } @@ -14633,6 +15659,24 @@ rec { ]; }; + "wit-bindgen-rt" = rec { + crateName = "wit-bindgen-rt"; + version = "0.33.0"; + edition = "2021"; + sha256 = "0g4lwfp9x6a2i1hgjn8k14nr4fsnpd5izxhc75zpi2s5cvcg6s1j"; + libName = "wit_bindgen_rt"; + dependencies = [ + { + name = "bitflags"; + packageId = "bitflags 2.8.0"; + optional = true; + } + ]; + features = { + "bitflags" = [ "dep:bitflags" ]; + }; + resolvedDefaultFeatures = [ "bitflags" ]; + }; "write16" = rec { crateName = "write16"; version = "1.0.0"; @@ -14779,7 +15823,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "fold" ]; } { @@ -14852,7 +15896,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; } ]; @@ -14900,7 +15944,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "fold" ]; } { @@ -14984,7 +16028,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.96"; + packageId = "syn 2.0.98"; features = [ "extra-traits" ]; } ]; diff --git a/Cargo.toml b/Cargo.toml index 6ad10256..379a429b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,6 +34,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" snafu = "0.8" stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.85.0" } +stackable-versioned = { git = "https://github.com/stackabletech/operator-rs.git", features = ["k8s"], tag = "stackable-versioned-0.5.0" } strum = { version = "0.26", features = ["derive"] } tar = "0.4" tokio = { version = "1.40", features = ["full"] } diff --git a/crate-hashes.json b/crate-hashes.json index 290d87f2..c7d32c3a 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -2,5 +2,8 @@ "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.85.0#stackable-operator-derive@0.3.1": "0rh476rmn5850yj85hq8znwmlfhd7l5bkxz0n5i9m4cddxhi2cl5", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.85.0#stackable-operator@0.85.0": "0rh476rmn5850yj85hq8znwmlfhd7l5bkxz0n5i9m4cddxhi2cl5", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.85.0#stackable-shared@0.0.1": "0rh476rmn5850yj85hq8znwmlfhd7l5bkxz0n5i9m4cddxhi2cl5", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#k8s-version@0.1.2": "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#stackable-versioned-macros@0.5.0": "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-versioned-0.5.0#stackable-versioned@0.5.0": "1x2pfibrsysmkkmajyj30qkwsjf3rzmc3dxsd09jb9r4x7va6mr6", "git+https://github.com/stackabletech/product-config.git?tag=0.7.0#product-config@0.7.0": "0gjsm80g6r75pm3824dcyiz4ysq1ka4c1if6k1mjm9cnd5ym0gny" } \ No newline at end of file diff --git a/rust/crd/Cargo.toml b/rust/crd/Cargo.toml deleted file mode 100644 index b0e2c7dc..00000000 --- a/rust/crd/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "stackable-opa-crd" -description = "Contains the OPA CRD structs and utilities" -version.workspace = true -authors.workspace = true -license.workspace = true -edition.workspace = true -repository.workspace = true -publish = false - -[dependencies] -semver.workspace = true -serde.workspace = true -serde_json.workspace = true -snafu.workspace = true -stackable-operator.workspace = true -strum.workspace = true -tracing.workspace = true diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs deleted file mode 100644 index 1c0a57a4..00000000 --- a/rust/crd/src/lib.rs +++ /dev/null @@ -1,373 +0,0 @@ -use std::{collections::BTreeMap, str::FromStr}; - -use serde::{Deserialize, Serialize}; -use snafu::{OptionExt, ResultExt, Snafu}; -use stackable_operator::{ - commons::{ - affinity::StackableAffinity, - cluster_operation::ClusterOperation, - product_image_selection::ProductImage, - resources::{ - CpuLimitsFragment, MemoryLimitsFragment, NoRuntimeLimits, NoRuntimeLimitsFragment, - Resources, ResourcesFragment, - }, - }, - config::{ - fragment::{self, Fragment, ValidationError}, - merge::Merge, - }, - k8s_openapi::apimachinery::pkg::api::resource::Quantity, - kube::CustomResource, - product_config_utils::Configuration, - product_logging::{self, spec::Logging}, - role_utils::{ - EmptyRoleConfig, GenericProductSpecificCommonConfig, Role, RoleGroup, RoleGroupRef, - }, - schemars::{self, JsonSchema}, - status::condition::{ClusterCondition, HasStatusCondition}, - time::Duration, - utils::cluster_info::KubernetesClusterInfo, -}; -use strum::{Display, EnumIter, EnumString}; - -pub mod user_info_fetcher; - -pub const APP_NAME: &str = "opa"; -pub const OPERATOR_NAME: &str = "opa.stackable.tech"; - -pub const DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(2); -/// Safety puffer to guarantee the graceful shutdown works every time. -pub const SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD: Duration = Duration::from_secs(5); - -#[derive(Snafu, Debug)] -pub enum Error { - #[snafu(display("the role group {role_group} is not defined"))] - CannotRetrieveOpaRoleGroup { role_group: String }, - - #[snafu(display("unknown role {role}"))] - UnknownOpaRole { - source: strum::ParseError, - role: String, - }, - - #[snafu(display("the role group [{role_group}] is missing"))] - MissingRoleGroup { role_group: String }, - - #[snafu(display("fragment validation failure"))] - FragmentValidationFailure { source: ValidationError }, -} - -#[derive(Clone, CustomResource, Debug, Deserialize, JsonSchema, Serialize)] -#[kube( - group = "opa.stackable.tech", - version = "v1alpha1", - kind = "OpaCluster", - shortname = "opa", - status = "OpaClusterStatus", - namespaced, - crates( - kube_core = "stackable_operator::kube::core", - k8s_openapi = "stackable_operator::k8s_openapi", - schemars = "stackable_operator::schemars" - ) -)] -#[serde(rename_all = "camelCase")] -pub struct OpaSpec { - /// Global OPA cluster configuration that applies to all roles and role groups. - #[serde(default)] - pub cluster_config: OpaClusterConfig, - /// Cluster operations like pause reconciliation or cluster stop. - #[serde(default)] - pub cluster_operation: ClusterOperation, - /// OPA server configuration. - pub servers: Role, - /// The OPA image to use - pub image: ProductImage, -} - -#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct OpaClusterConfig { - /// Name of the Vector aggregator discovery ConfigMap. - /// It must contain the key `ADDRESS` with the address of the Vector aggregator. - #[serde(skip_serializing_if = "Option::is_none")] - pub vector_aggregator_config_map_name: Option, - /// This field controls which type of Service the operator creates for this OpaCluster: - /// - /// * cluster-internal: Use a ClusterIP service - /// - /// * external-unstable: Use a NodePort service - /// - /// * external-stable: Use a LoadBalancer service - /// - /// This is a temporary solution with the goal to keep yaml manifests forward compatible. - /// In the future, this setting will control which ListenerClass - /// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change. - #[serde(default)] - pub listener_class: CurrentlySupportedListenerClasses, - /// Configures how to fetch additional metadata about users (such as group memberships) - /// from an external directory service. - #[serde(default)] - pub user_info: Option, -} - -// TODO: Temporary solution until listener-operator is finished -#[derive(Clone, Debug, Default, Display, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "PascalCase")] -pub enum CurrentlySupportedListenerClasses { - #[default] - #[serde(rename = "cluster-internal")] - ClusterInternal, - #[serde(rename = "external-unstable")] - ExternalUnstable, - #[serde(rename = "external-stable")] - ExternalStable, -} - -impl CurrentlySupportedListenerClasses { - pub fn k8s_service_type(&self) -> String { - match self { - CurrentlySupportedListenerClasses::ClusterInternal => "ClusterIP".to_string(), - CurrentlySupportedListenerClasses::ExternalUnstable => "NodePort".to_string(), - CurrentlySupportedListenerClasses::ExternalStable => "LoadBalancer".to_string(), - } - } -} - -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, Debug, Default, Fragment, JsonSchema, PartialEq)] -#[fragment_attrs( - allow(clippy::derive_partial_eq_without_eq), - derive( - Clone, - Debug, - Default, - Deserialize, - Merge, - JsonSchema, - PartialEq, - Serialize - ), - serde(rename_all = "camelCase") -)] -pub struct OpaStorageConfig {} - -#[derive( - Clone, - Debug, - Deserialize, - Display, - Eq, - EnumIter, - JsonSchema, - Ord, - PartialEq, - PartialOrd, - Serialize, -)] -#[serde(rename_all = "kebab-case")] -#[strum(serialize_all = "kebab-case")] -pub enum Container { - Prepare, - Vector, - BundleBuilder, - Opa, -} - -#[derive(Clone, Debug, Default, Fragment, JsonSchema, PartialEq)] -#[fragment_attrs( - derive( - Clone, - Debug, - Default, - Deserialize, - Merge, - JsonSchema, - PartialEq, - Serialize - ), - serde(rename_all = "camelCase") -)] -pub struct OpaConfig { - #[fragment_attrs(serde(default))] - pub resources: Resources, - - #[fragment_attrs(serde(default))] - pub logging: Logging, - - #[fragment_attrs(serde(default))] - pub affinity: StackableAffinity, - - /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details. - #[fragment_attrs(serde(default))] - pub graceful_shutdown_timeout: Option, -} - -impl OpaConfig { - fn default_config() -> OpaConfigFragment { - OpaConfigFragment { - logging: product_logging::spec::default_logging(), - resources: ResourcesFragment { - cpu: CpuLimitsFragment { - min: Some(Quantity("250m".to_owned())), - max: Some(Quantity("500m".to_owned())), - }, - memory: MemoryLimitsFragment { - limit: Some(Quantity("256Mi".to_owned())), - runtime_limits: NoRuntimeLimitsFragment {}, - }, - storage: OpaStorageConfigFragment {}, - }, - // There is no point in having a default affinity, as exactly one OPA Pods should run on every node. - // We only have the affinity configurable to let users limit the nodes the OPA Pods run on. - affinity: Default::default(), - graceful_shutdown_timeout: Some(DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT), - } - } -} - -impl Configuration for OpaConfigFragment { - type Configurable = OpaCluster; - - fn compute_env( - &self, - _resource: &Self::Configurable, - _role_name: &str, - ) -> Result>, stackable_operator::product_config_utils::Error> - { - Ok(BTreeMap::new()) - } - - fn compute_cli( - &self, - _resource: &Self::Configurable, - _role_name: &str, - ) -> Result>, stackable_operator::product_config_utils::Error> - { - Ok(BTreeMap::new()) - } - - fn compute_files( - &self, - _resource: &Self::Configurable, - _role_name: &str, - _file: &str, - ) -> Result>, stackable_operator::product_config_utils::Error> - { - Ok(BTreeMap::new()) - } -} - -#[derive( - EnumIter, - Clone, - Debug, - Hash, - Deserialize, - Eq, - JsonSchema, - PartialEq, - Serialize, - Display, - EnumString, -)] -pub enum OpaRole { - #[serde(rename = "server")] - #[strum(serialize = "server")] - Server, -} - -impl OpaCluster { - /// Returns a reference to the role. - pub fn role(&self, role_variant: &OpaRole) -> &Role { - match role_variant { - OpaRole::Server => &self.spec.servers, - } - } - - /// Returns a reference to the role group. Raises an error if the role or role group are not defined. - pub fn rolegroup( - &self, - rolegroup_ref: &RoleGroupRef, - ) -> Result<&RoleGroup, Error> { - let role_variant = - OpaRole::from_str(&rolegroup_ref.role).with_context(|_| UnknownOpaRoleSnafu { - role: rolegroup_ref.role.to_owned(), - })?; - let role = self.role(&role_variant); - role.role_groups - .get(&rolegroup_ref.role_group) - .with_context(|| CannotRetrieveOpaRoleGroupSnafu { - role_group: rolegroup_ref.role_group.to_owned(), - }) - } - - /// The name of the role-level load-balanced Kubernetes `Service` - pub fn server_role_service_name(&self) -> Option { - self.metadata.name.clone() - } - - /// The fully-qualified domain name of the role-level load-balanced Kubernetes `Service` - pub fn server_role_service_fqdn(&self, cluster_info: &KubernetesClusterInfo) -> Option { - Some(format!( - "{role_service_name}.{namespace}.svc.{cluster_domain}", - role_service_name = self.server_role_service_name()?, - namespace = self.metadata.namespace.as_ref()?, - cluster_domain = cluster_info.cluster_domain - )) - } - - /// Retrieve and merge resource configs for role and role groups - pub fn merged_config( - &self, - role: &OpaRole, - rolegroup_ref: &RoleGroupRef, - ) -> Result { - // Initialize the result with all default values as baseline - let conf_defaults = OpaConfig::default_config(); - - let opa_role = match role { - OpaRole::Server => &self.spec.servers, - }; - - let mut conf_role = opa_role.config.config.to_owned(); - - // Retrieve rolegroup specific resource config - let mut conf_rolegroup = opa_role - .role_groups - .get(&rolegroup_ref.role_group) - .context(MissingRoleGroupSnafu { - role_group: rolegroup_ref.role_group.clone(), - })? - .to_owned() - .config - .config; - - // Merge more specific configs into default config - // Hierarchy is: - // 1. RoleGroup - // 2. Role - // 3. Default - conf_role.merge(&conf_defaults); - conf_rolegroup.merge(&conf_role); - - tracing::debug!("Merged config: {:?}", conf_rolegroup); - fragment::validate(conf_rolegroup).context(FragmentValidationFailureSnafu) - } -} - -#[derive(Clone, Default, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct OpaClusterStatus { - #[serde(default)] - pub conditions: Vec, -} - -impl HasStatusCondition for OpaCluster { - fn conditions(&self) -> Vec { - match &self.status { - Some(status) => status.conditions.clone(), - None => vec![], - } - } -} diff --git a/rust/crd/src/user_info_fetcher.rs b/rust/crd/src/user_info_fetcher.rs deleted file mode 100644 index c0f81cb0..00000000 --- a/rust/crd/src/user_info_fetcher.rs +++ /dev/null @@ -1,137 +0,0 @@ -use std::collections::BTreeMap; - -use serde::{Deserialize, Serialize}; -use stackable_operator::{ - commons::{networking::HostName, tls_verification::TlsClientDetails}, - schemars::{self, JsonSchema}, - time::Duration, -}; - -#[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct Config { - /// The backend directory service to use. - #[serde(default)] - pub backend: Backend, - - /// Caching configuration. - #[serde(default)] - pub cache: Cache, -} - -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub enum Backend { - /// Dummy backend that adds no extra user information. - None {}, - - /// Backend that fetches user information from Keycloak. - Keycloak(KeycloakBackend), - - /// Backend that fetches user information from the Gaia-X - /// Cross Federation Services Components (XFSC) Authentication & Authorization Service. - ExperimentalXfscAas(AasBackend), - - /// Backend that fetches user information from Active Directory - #[serde(rename = "experimentalActiveDirectory")] - ActiveDirectory(ActiveDirectoryBackend), -} - -impl Default for Backend { - fn default() -> Self { - Self::None {} - } -} - -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct KeycloakBackend { - /// Hostname of the identity provider, e.g. `my.keycloak.corp`. - pub hostname: HostName, - - /// Port of the identity provider. If TLS is used defaults to `443`, otherwise to `80`. - pub port: Option, - - /// Root HTTP path of the identity provider. Defaults to `/`. - #[serde(default = "default_root_path")] - pub root_path: String, - - /// Use a TLS connection. If not specified no TLS will be used. - #[serde(flatten)] - pub tls: TlsClientDetails, - - /// Name of a Secret that contains client credentials of a Keycloak account with permission to read user metadata. - /// - /// Must contain the fields `clientId` and `clientSecret`. - pub client_credentials_secret: String, - - /// The Keycloak realm that OPA's Keycloak account (as specified by `credentialsSecretName` exists in). - /// - /// Typically `master`. - pub admin_realm: String, - - /// The Keycloak realm that user metadata should be resolved from. - pub user_realm: String, -} - -fn default_root_path() -> String { - "/".to_string() -} - -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct AasBackend { - /// Hostname of the identity provider, e.g. `my.aas.corp`. - pub hostname: String, - - /// Port of the identity provider. Defaults to port 5000. - #[serde(default = "aas_default_port")] - pub port: u16, -} - -fn aas_default_port() -> u16 { - 5000 -} - -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct ActiveDirectoryBackend { - /// Hostname of the domain controller, e.g. `ad-ds-1.contoso.com`. - pub ldap_server: String, - - /// The root Distinguished Name (DN) where users and groups are located. - pub base_distinguished_name: String, - - /// The name of the Kerberos SecretClass. - pub kerberos_secret_class_name: String, - - /// Use a TLS connection. If not specified then no TLS will be used. - #[serde(flatten)] - pub tls: TlsClientDetails, - - /// Custom attributes, and their LDAP attribute names. - #[serde(default)] - pub custom_attribute_mappings: BTreeMap, -} - -#[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct Cache { - /// How long metadata about each user should be cached for. - #[serde(default = "Cache::default_entry_time_to_live")] - pub entry_time_to_live: Duration, -} - -impl Cache { - const fn default_entry_time_to_live() -> Duration { - Duration::from_minutes_unchecked(1) - } -} - -impl Default for Cache { - fn default() -> Self { - Self { - entry_time_to_live: Self::default_entry_time_to_live(), - } - } -} diff --git a/rust/operator-binary/Cargo.toml b/rust/operator-binary/Cargo.toml index 5ae017df..f4bfaabd 100644 --- a/rust/operator-binary/Cargo.toml +++ b/rust/operator-binary/Cargo.toml @@ -9,8 +9,6 @@ repository.workspace = true publish = false [dependencies] -stackable-opa-crd = { path = "../crd" } - anyhow.workspace = true clap.workspace = true const_format.workspace = true @@ -24,6 +22,7 @@ serde_json.workspace = true serde.workspace = true snafu.workspace = true stackable-operator.workspace = true +stackable-versioned.workspace = true strum.workspace = true tokio.workspace = true tracing.workspace = true diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index b83424a4..1f1d9458 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -10,9 +10,8 @@ use product_config::{types::PropertyNameKind, ProductConfigManager}; use serde::{Deserialize, Serialize}; use serde_json::json; use snafu::{OptionExt, ResultExt, Snafu}; -use stackable_opa_crd::{ - user_info_fetcher, Container, OpaCluster, OpaClusterStatus, OpaConfig, OpaRole, APP_NAME, - DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT, OPERATOR_NAME, +use stackable_opa_operator::crd::{ + user_info_fetcher, v1alpha1, APP_NAME, DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT, OPERATOR_NAME, }; use stackable_operator::{ builder::{ @@ -162,7 +161,9 @@ pub enum Error { NoName, #[snafu(display("internal operator failure"))] - InternalOperatorFailure { source: stackable_opa_crd::Error }, + InternalOperatorFailure { + source: stackable_opa_operator::crd::Error, + }, #[snafu(display("failed to calculate role service name"))] RoleServiceNameNotFound, @@ -175,31 +176,31 @@ pub enum Error { #[snafu(display("failed to apply Service for [{rolegroup}]"))] ApplyRoleGroupService { source: stackable_operator::cluster_resources::Error, - rolegroup: RoleGroupRef, + rolegroup: RoleGroupRef, }, #[snafu(display("failed to build ConfigMap for [{rolegroup}]"))] BuildRoleGroupConfig { source: stackable_operator::builder::configmap::Error, - rolegroup: RoleGroupRef, + rolegroup: RoleGroupRef, }, #[snafu(display("failed to apply ConfigMap for [{rolegroup}]"))] ApplyRoleGroupConfig { source: stackable_operator::cluster_resources::Error, - rolegroup: RoleGroupRef, + rolegroup: RoleGroupRef, }, #[snafu(display("failed to apply DaemonSet for [{rolegroup}]"))] ApplyRoleGroupDaemonSet { source: stackable_operator::cluster_resources::Error, - rolegroup: RoleGroupRef, + rolegroup: RoleGroupRef, }, #[snafu(display("failed to apply patch for DaemonSet for [{rolegroup}]"))] ApplyPatchRoleGroupDaemonSet { source: stackable_operator::client::Error, - rolegroup: RoleGroupRef, + rolegroup: RoleGroupRef, }, #[snafu(display("failed to patch service account"))] @@ -241,7 +242,9 @@ pub enum Error { }, #[snafu(display("failed to resolve and merge config for role and role group"))] - FailedToResolveConfig { source: stackable_opa_crd::Error }, + FailedToResolveConfig { + source: stackable_opa_operator::crd::Error, + }, #[snafu(display("illegal container name"))] IllegalContainerName { @@ -386,7 +389,7 @@ pub struct OpaClusterConfigDecisionLog { } pub async fn reconcile_opa( - opa: Arc>, + opa: Arc>, ctx: Arc, ) -> Result { tracing::info!("Starting reconcile"); @@ -402,7 +405,7 @@ pub async fn reconcile_opa( .spec .image .resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION); - let opa_role = OpaRole::Server; + let opa_role = v1alpha1::OpaRole::Server; let mut cluster_resources = ClusterResources::new( APP_NAME, @@ -561,7 +564,7 @@ pub async fn reconcile_opa( let cluster_operation_cond_builder = ClusterOperationsConditionBuilder::new(&opa.spec.cluster_operation); - let status = OpaClusterStatus { + let status = v1alpha1::OpaClusterStatus { conditions: compute_conditions(opa, &[&ds_cond_builder, &cluster_operation_cond_builder]), }; @@ -581,10 +584,10 @@ pub async fn reconcile_opa( /// The server-role service is the primary endpoint that should be used by clients that do not perform internal load balancing, /// including targets outside of the cluster. pub fn build_server_role_service( - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, ) -> Result { - let role_name = OpaRole::Server.to_string(); + let role_name = v1alpha1::OpaRole::Server.to_string(); let role_svc_name = opa .server_role_service_name() .context(RoleServiceNameNotFoundSnafu)?; @@ -630,9 +633,9 @@ pub fn build_server_role_service( /// /// This is mostly useful for internal communication between peers, or for clients that perform client-side load balancing. fn build_rolegroup_service( - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, - rolegroup: &RoleGroupRef, + rolegroup: &RoleGroupRef, ) -> Result { let prometheus_label = Label::try_from(("prometheus.io/scrape", "true")).context(BuildLabelSnafu)?; @@ -675,10 +678,10 @@ fn build_rolegroup_service( /// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator fn build_server_rolegroup_config_map( - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, - rolegroup: &RoleGroupRef, - merged_config: &OpaConfig, + rolegroup: &RoleGroupRef, + merged_config: &v1alpha1::OpaConfig, vector_aggregator_address: Option<&str>, ) -> Result { let mut cm_builder = ConfigMapBuilder::new(); @@ -734,12 +737,12 @@ fn build_server_rolegroup_config_map( /// policy queries (which are often chained in serial, and block other tasks in the products). #[allow(clippy::too_many_arguments)] fn build_server_rolegroup_daemonset( - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, - opa_role: &OpaRole, - rolegroup_ref: &RoleGroupRef, + opa_role: &v1alpha1::OpaRole, + rolegroup_ref: &RoleGroupRef, server_config: &HashMap>, - merged_config: &OpaConfig, + merged_config: &v1alpha1::OpaConfig, opa_bundle_builder_image: &str, user_info_fetcher_image: &str, service_account: &ServiceAccount, @@ -762,15 +765,15 @@ fn build_server_rolegroup_daemonset( let mut pb = PodBuilder::new(); - let prepare_container_name = Container::Prepare.to_string(); + let prepare_container_name = v1alpha1::Container::Prepare.to_string(); let mut cb_prepare = ContainerBuilder::new(&prepare_container_name).context(IllegalContainerNameSnafu)?; - let bundle_builder_container_name = Container::BundleBuilder.to_string(); + let bundle_builder_container_name = v1alpha1::Container::BundleBuilder.to_string(); let mut cb_bundle_builder = ContainerBuilder::new(&bundle_builder_container_name).context(IllegalContainerNameSnafu)?; - let opa_container_name = Container::Opa.to_string(); + let opa_container_name = v1alpha1::Container::Opa.to_string(); let mut cb_opa = ContainerBuilder::new(&opa_container_name).context(IllegalContainerNameSnafu)?; @@ -969,9 +972,9 @@ fn build_server_rolegroup_daemonset( ); match &user_info.backend { - user_info_fetcher::Backend::None {} => {} - user_info_fetcher::Backend::ExperimentalXfscAas(_) => {} - user_info_fetcher::Backend::ActiveDirectory(ad) => { + user_info_fetcher::v1alpha1::Backend::None {} => {} + user_info_fetcher::v1alpha1::Backend::ExperimentalXfscAas(_) => {} + user_info_fetcher::v1alpha1::Backend::ActiveDirectory(ad) => { pb.add_volume( SecretClassVolume::new( ad.kerberos_secret_class_name.clone(), @@ -1005,7 +1008,7 @@ fn build_server_rolegroup_daemonset( .add_volumes_and_mounts(&mut pb, vec![&mut cb_user_info_fetcher]) .context(UserInfoFetcherTlsVolumeAndMountsSnafu)?; } - user_info_fetcher::Backend::Keycloak(keycloak) => { + user_info_fetcher::v1alpha1::Backend::Keycloak(keycloak) => { pb.add_volume( VolumeBuilder::new(USER_INFO_FETCHER_CREDENTIALS_VOLUME_NAME) .secret(SecretVolumeSource { @@ -1037,7 +1040,10 @@ fn build_server_rolegroup_daemonset( resolved_product_image, CONFIG_VOLUME_NAME, LOG_VOLUME_NAME, - merged_config.logging.containers.get(&Container::Vector), + merged_config + .logging + .containers + .get(&v1alpha1::Container::Vector), ResourceRequirementsBuilder::new() .with_cpu_request("250m") .with_cpu_limit("500m") @@ -1094,7 +1100,7 @@ fn build_server_rolegroup_daemonset( } pub fn error_policy( - _obj: Arc>, + _obj: Arc>, error: &Error, _ctx: Arc, ) -> Action { @@ -1106,12 +1112,15 @@ pub fn error_policy( } } -fn build_config_file(merged_config: &OpaConfig) -> String { +fn build_config_file(merged_config: &v1alpha1::OpaConfig) -> String { let mut decision_logging_enabled = DEFAULT_DECISION_LOGGING_ENABLED; if let Some(ContainerLogConfig { choice: Some(ContainerLogConfigChoice::Automatic(log_config)), - }) = merged_config.logging.containers.get(&Container::Opa) + }) = merged_config + .logging + .containers + .get(&v1alpha1::Container::Opa) { if let Some(config) = log_config.loggers.get("decision") { decision_logging_enabled = config.level != LogLevel::NONE; @@ -1131,7 +1140,7 @@ fn build_config_file(merged_config: &OpaConfig) -> String { serde_json::to_string_pretty(&json!(config)).unwrap() } -fn build_opa_start_command(merged_config: &OpaConfig, container_name: &str) -> String { +fn build_opa_start_command(merged_config: &v1alpha1::OpaConfig, container_name: &str) -> String { let mut file_log_level = DEFAULT_FILE_LOG_LEVEL; let mut console_log_level = DEFAULT_CONSOLE_LOG_LEVEL; let mut server_log_level = DEFAULT_SERVER_LOG_LEVEL; @@ -1139,7 +1148,10 @@ fn build_opa_start_command(merged_config: &OpaConfig, container_name: &str) -> S if let Some(ContainerLogConfig { choice: Some(ContainerLogConfigChoice::Automatic(log_config)), - }) = merged_config.logging.containers.get(&Container::Opa) + }) = merged_config + .logging + .containers + .get(&v1alpha1::Container::Opa) { if let Some(AppenderConfig { level: Some(log_level), @@ -1201,7 +1213,10 @@ fn build_opa_start_command(merged_config: &OpaConfig, container_name: &str) -> S } } -fn build_bundle_builder_start_command(merged_config: &OpaConfig, container_name: &str) -> String { +fn build_bundle_builder_start_command( + merged_config: &v1alpha1::OpaConfig, + container_name: &str, +) -> String { let mut console_logging_off = false; // We need to check if the console logging is deactivated (NONE) @@ -1211,7 +1226,7 @@ fn build_bundle_builder_start_command(merged_config: &OpaConfig, container_name: }) = merged_config .logging .containers - .get(&Container::BundleBuilder) + .get(&v1alpha1::Container::BundleBuilder) { if let Some(AppenderConfig { level: Some(log_level), @@ -1236,13 +1251,13 @@ fn build_bundle_builder_start_command(merged_config: &OpaConfig, container_name: } } -fn bundle_builder_log_level(merged_config: &OpaConfig) -> BundleBuilderLogLevel { +fn bundle_builder_log_level(merged_config: &v1alpha1::OpaConfig) -> BundleBuilderLogLevel { if let Some(ContainerLogConfig { choice: Some(ContainerLogConfigChoice::Automatic(log_config)), }) = merged_config .logging .containers - .get(&Container::BundleBuilder) + .get(&v1alpha1::Container::BundleBuilder) { if let Some(logger) = log_config .loggers @@ -1255,11 +1270,17 @@ fn bundle_builder_log_level(merged_config: &OpaConfig) -> BundleBuilderLogLevel BundleBuilderLogLevel::Info } -fn build_prepare_start_command(merged_config: &OpaConfig, container_name: &str) -> Vec { +fn build_prepare_start_command( + merged_config: &v1alpha1::OpaConfig, + container_name: &str, +) -> Vec { let mut prepare_container_args = vec![]; if let Some(ContainerLogConfig { choice: Some(ContainerLogConfigChoice::Automatic(log_config)), - }) = merged_config.logging.containers.get(&Container::Prepare) + }) = merged_config + .logging + .containers + .get(&v1alpha1::Container::Prepare) { prepare_container_args.push(product_logging::framework::capture_shell_output( STACKABLE_LOG_DIR, diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs new file mode 100644 index 00000000..0c979979 --- /dev/null +++ b/rust/operator-binary/src/crd/mod.rs @@ -0,0 +1,383 @@ +use std::{collections::BTreeMap, str::FromStr}; + +use serde::{Deserialize, Serialize}; +use snafu::{OptionExt, ResultExt, Snafu}; +use stackable_operator::{ + commons::{ + affinity::StackableAffinity, + cluster_operation::ClusterOperation, + product_image_selection::ProductImage, + resources::{ + CpuLimitsFragment, MemoryLimitsFragment, NoRuntimeLimits, NoRuntimeLimitsFragment, + Resources, ResourcesFragment, + }, + }, + config::{ + fragment::{self, Fragment, ValidationError}, + merge::Merge, + }, + k8s_openapi::apimachinery::pkg::api::resource::Quantity, + kube::CustomResource, + product_config_utils::Configuration, + product_logging::{self, spec::Logging}, + role_utils::{ + EmptyRoleConfig, GenericProductSpecificCommonConfig, Role, RoleGroup, RoleGroupRef, + }, + schemars::{self, JsonSchema}, + status::condition::{ClusterCondition, HasStatusCondition}, + time::Duration, + utils::cluster_info::KubernetesClusterInfo, +}; +use stackable_versioned::versioned; +use strum::{Display, EnumIter, EnumString}; + +pub mod user_info_fetcher; + +pub const APP_NAME: &str = "opa"; +pub const OPERATOR_NAME: &str = "opa.stackable.tech"; + +pub const DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(2); +/// Safety puffer to guarantee the graceful shutdown works every time. +pub const SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD: Duration = Duration::from_secs(5); + +#[derive(Snafu, Debug)] +pub enum Error { + #[snafu(display("the role group {role_group} is not defined"))] + CannotRetrieveOpaRoleGroup { role_group: String }, + + #[snafu(display("unknown role {role}"))] + UnknownOpaRole { + source: strum::ParseError, + role: String, + }, + + #[snafu(display("the role group [{role_group}] is missing"))] + MissingRoleGroup { role_group: String }, + + #[snafu(display("fragment validation failure"))] + FragmentValidationFailure { source: ValidationError }, +} + +#[versioned(version(name = "v1alpha1"), options(skip(from)))] +pub mod versioned { + #[versioned(k8s( + group = "opa.stackable.tech", + kind = "OpaCluster", + status = "OpaClusterStatus", + namespaced, + shortname = "opa", + crates( + kube_core = ::stackable_operator::kube::core, + k8s_openapi = ::stackable_operator::k8s_openapi, + schemars = ::stackable_operator::schemars + ) + ))] + #[derive(Clone, Debug, Deserialize, CustomResource, JsonSchema, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct OpaSpec { + /// Global OPA cluster configuration that applies to all roles and role groups. + #[serde(default)] + pub cluster_config: v1alpha1::OpaClusterConfig, + /// Cluster operations like pause reconciliation or cluster stop. + #[serde(default)] + pub cluster_operation: ClusterOperation, + /// OPA server configuration. + pub servers: Role, + /// The OPA image to use + pub image: ProductImage, + } + + #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct OpaClusterConfig { + /// Name of the Vector aggregator discovery ConfigMap. + /// It must contain the key `ADDRESS` with the address of the Vector aggregator. + #[serde(skip_serializing_if = "Option::is_none")] + pub vector_aggregator_config_map_name: Option, + /// This field controls which type of Service the operator creates for this OpaCluster: + /// + /// * cluster-internal: Use a ClusterIP service + /// + /// * external-unstable: Use a NodePort service + /// + /// * external-stable: Use a LoadBalancer service + /// + /// This is a temporary solution with the goal to keep yaml manifests forward compatible. + /// In the future, this setting will control which ListenerClass + /// will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change. + #[serde(default)] + pub listener_class: v1alpha1::CurrentlySupportedListenerClasses, + /// Configures how to fetch additional metadata about users (such as group memberships) + /// from an external directory service. + #[serde(default)] + pub user_info: Option, + } + + // TODO: Temporary solution until listener-operator is finished + #[derive(Clone, Debug, Default, Display, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "PascalCase")] + pub enum CurrentlySupportedListenerClasses { + #[default] + #[serde(rename = "cluster-internal")] + ClusterInternal, + #[serde(rename = "external-unstable")] + ExternalUnstable, + #[serde(rename = "external-stable")] + ExternalStable, + } + + #[allow(clippy::derive_partial_eq_without_eq)] + #[derive(Clone, Debug, Default, Fragment, JsonSchema, PartialEq)] + #[fragment_attrs( + allow(clippy::derive_partial_eq_without_eq), + derive( + Clone, + Debug, + Default, + Deserialize, + Merge, + JsonSchema, + PartialEq, + Serialize + ), + serde(rename_all = "camelCase") + )] + pub struct OpaStorageConfig {} + + #[derive( + Clone, + Debug, + Deserialize, + Display, + Eq, + EnumIter, + JsonSchema, + Ord, + PartialEq, + PartialOrd, + Serialize, + )] + #[serde(rename_all = "kebab-case")] + #[strum(serialize_all = "kebab-case")] + pub enum Container { + Prepare, + Vector, + BundleBuilder, + Opa, + } + + #[derive(Clone, Debug, Default, Fragment, JsonSchema, PartialEq)] + #[fragment_attrs( + derive( + Clone, + Debug, + Default, + Deserialize, + Merge, + JsonSchema, + PartialEq, + Serialize + ), + serde(rename_all = "camelCase") + )] + pub struct OpaConfig { + #[fragment_attrs(serde(default))] + pub resources: Resources, + + #[fragment_attrs(serde(default))] + pub logging: Logging, + + #[fragment_attrs(serde(default))] + pub affinity: StackableAffinity, + + /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details. + #[fragment_attrs(serde(default))] + pub graceful_shutdown_timeout: Option, + } + + #[derive( + EnumIter, + Clone, + Debug, + Hash, + Deserialize, + Eq, + JsonSchema, + PartialEq, + Serialize, + Display, + EnumString, + )] + pub enum OpaRole { + #[serde(rename = "server")] + #[strum(serialize = "server")] + Server, + } + + #[derive(Clone, Default, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct OpaClusterStatus { + #[serde(default)] + pub conditions: Vec, + } +} + +impl v1alpha1::CurrentlySupportedListenerClasses { + pub fn k8s_service_type(&self) -> String { + match self { + v1alpha1::CurrentlySupportedListenerClasses::ClusterInternal => "ClusterIP".to_string(), + v1alpha1::CurrentlySupportedListenerClasses::ExternalUnstable => "NodePort".to_string(), + v1alpha1::CurrentlySupportedListenerClasses::ExternalStable => { + "LoadBalancer".to_string() + } + } + } +} + +impl v1alpha1::OpaConfig { + fn default_config() -> v1alpha1::OpaConfigFragment { + v1alpha1::OpaConfigFragment { + logging: product_logging::spec::default_logging(), + resources: ResourcesFragment { + cpu: CpuLimitsFragment { + min: Some(Quantity("250m".to_owned())), + max: Some(Quantity("500m".to_owned())), + }, + memory: MemoryLimitsFragment { + limit: Some(Quantity("256Mi".to_owned())), + runtime_limits: NoRuntimeLimitsFragment {}, + }, + storage: v1alpha1::OpaStorageConfigFragment {}, + }, + // There is no point in having a default affinity, as exactly one OPA Pods should run on every node. + // We only have the affinity configurable to let users limit the nodes the OPA Pods run on. + affinity: Default::default(), + graceful_shutdown_timeout: Some(DEFAULT_SERVER_GRACEFUL_SHUTDOWN_TIMEOUT), + } + } +} + +impl Configuration for v1alpha1::OpaConfigFragment { + type Configurable = v1alpha1::OpaCluster; + + fn compute_env( + &self, + _resource: &Self::Configurable, + _role_name: &str, + ) -> Result>, stackable_operator::product_config_utils::Error> + { + Ok(BTreeMap::new()) + } + + fn compute_cli( + &self, + _resource: &Self::Configurable, + _role_name: &str, + ) -> Result>, stackable_operator::product_config_utils::Error> + { + Ok(BTreeMap::new()) + } + + fn compute_files( + &self, + _resource: &Self::Configurable, + _role_name: &str, + _file: &str, + ) -> Result>, stackable_operator::product_config_utils::Error> + { + Ok(BTreeMap::new()) + } +} + +impl v1alpha1::OpaCluster { + /// Returns a reference to the role. + pub fn role( + &self, + role_variant: &v1alpha1::OpaRole, + ) -> &Role { + match role_variant { + v1alpha1::OpaRole::Server => &self.spec.servers, + } + } + + /// Returns a reference to the role group. Raises an error if the role or role group are not defined. + pub fn rolegroup( + &self, + rolegroup_ref: &RoleGroupRef, + ) -> Result<&RoleGroup, Error> + { + let role_variant = v1alpha1::OpaRole::from_str(&rolegroup_ref.role).with_context(|_| { + UnknownOpaRoleSnafu { + role: rolegroup_ref.role.to_owned(), + } + })?; + let role = self.role(&role_variant); + role.role_groups + .get(&rolegroup_ref.role_group) + .with_context(|| CannotRetrieveOpaRoleGroupSnafu { + role_group: rolegroup_ref.role_group.to_owned(), + }) + } + + /// The name of the role-level load-balanced Kubernetes `Service` + pub fn server_role_service_name(&self) -> Option { + self.metadata.name.clone() + } + + /// The fully-qualified domain name of the role-level load-balanced Kubernetes `Service` + pub fn server_role_service_fqdn(&self, cluster_info: &KubernetesClusterInfo) -> Option { + Some(format!( + "{role_service_name}.{namespace}.svc.{cluster_domain}", + role_service_name = self.server_role_service_name()?, + namespace = self.metadata.namespace.as_ref()?, + cluster_domain = cluster_info.cluster_domain + )) + } + + /// Retrieve and merge resource configs for role and role groups + pub fn merged_config( + &self, + role: &v1alpha1::OpaRole, + rolegroup_ref: &RoleGroupRef, + ) -> Result { + // Initialize the result with all default values as baseline + let conf_defaults = v1alpha1::OpaConfig::default_config(); + + let opa_role = match role { + v1alpha1::OpaRole::Server => &self.spec.servers, + }; + + let mut conf_role = opa_role.config.config.to_owned(); + + // Retrieve rolegroup specific resource config + let mut conf_rolegroup = opa_role + .role_groups + .get(&rolegroup_ref.role_group) + .context(MissingRoleGroupSnafu { + role_group: rolegroup_ref.role_group.clone(), + })? + .to_owned() + .config + .config; + + // Merge more specific configs into default config + // Hierarchy is: + // 1. RoleGroup + // 2. Role + // 3. Default + conf_role.merge(&conf_defaults); + conf_rolegroup.merge(&conf_role); + + tracing::debug!("Merged config: {:?}", conf_rolegroup); + fragment::validate(conf_rolegroup).context(FragmentValidationFailureSnafu) + } +} + +impl HasStatusCondition for v1alpha1::OpaCluster { + fn conditions(&self) -> Vec { + match &self.status { + Some(status) => status.conditions.clone(), + None => vec![], + } + } +} diff --git a/rust/operator-binary/src/crd/user_info_fetcher.rs b/rust/operator-binary/src/crd/user_info_fetcher.rs new file mode 100644 index 00000000..830fbac8 --- /dev/null +++ b/rust/operator-binary/src/crd/user_info_fetcher.rs @@ -0,0 +1,141 @@ +use std::collections::BTreeMap; + +use serde::{Deserialize, Serialize}; +use stackable_operator::{ + commons::{networking::HostName, tls_verification::TlsClientDetails}, + schemars::{self, JsonSchema}, + time::Duration, +}; +use stackable_versioned::versioned; + +#[versioned(version(name = "v1alpha1"))] +pub mod versioned { + #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct Config { + /// The backend directory service to use. + #[serde(default)] + pub backend: v1alpha1::Backend, + + /// Caching configuration. + #[serde(default)] + pub cache: v1alpha1::Cache, + } + + #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub enum Backend { + /// Dummy backend that adds no extra user information. + None {}, + + /// Backend that fetches user information from Keycloak. + Keycloak(v1alpha1::KeycloakBackend), + + /// Backend that fetches user information from the Gaia-X + /// Cross Federation Services Components (XFSC) Authentication & Authorization Service. + ExperimentalXfscAas(v1alpha1::AasBackend), + + /// Backend that fetches user information from Active Directory + #[serde(rename = "experimentalActiveDirectory")] + ActiveDirectory(v1alpha1::ActiveDirectoryBackend), + } + + #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct KeycloakBackend { + /// Hostname of the identity provider, e.g. `my.keycloak.corp`. + pub hostname: HostName, + + /// Port of the identity provider. If TLS is used defaults to `443`, otherwise to `80`. + pub port: Option, + + /// Root HTTP path of the identity provider. Defaults to `/`. + #[serde(default = "default_root_path")] + pub root_path: String, + + /// Use a TLS connection. If not specified no TLS will be used. + #[serde(flatten)] + pub tls: TlsClientDetails, + + /// Name of a Secret that contains client credentials of a Keycloak account with permission to read user metadata. + /// + /// Must contain the fields `clientId` and `clientSecret`. + pub client_credentials_secret: String, + + /// The Keycloak realm that OPA's Keycloak account (as specified by `credentialsSecretName` exists in). + /// + /// Typically `master`. + pub admin_realm: String, + + /// The Keycloak realm that user metadata should be resolved from. + pub user_realm: String, + } + + #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct AasBackend { + /// Hostname of the identity provider, e.g. `my.aas.corp`. + pub hostname: String, + + /// Port of the identity provider. Defaults to port 5000. + #[serde(default = "aas_default_port")] + pub port: u16, + } + + #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct ActiveDirectoryBackend { + /// Hostname of the domain controller, e.g. `ad-ds-1.contoso.com`. + pub ldap_server: String, + + /// The root Distinguished Name (DN) where users and groups are located. + pub base_distinguished_name: String, + + /// The name of the Kerberos SecretClass. + pub kerberos_secret_class_name: String, + + /// Use a TLS connection. If not specified then no TLS will be used. + #[serde(flatten)] + pub tls: TlsClientDetails, + + /// Custom attributes, and their LDAP attribute names. + #[serde(default)] + pub custom_attribute_mappings: BTreeMap, + } + + #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct Cache { + /// How long metadata about each user should be cached for. + #[serde(default = "v1alpha1::Cache::default_entry_time_to_live")] + pub entry_time_to_live: Duration, + } +} + +impl Default for v1alpha1::Backend { + fn default() -> Self { + Self::None {} + } +} + +fn default_root_path() -> String { + "/".to_string() +} + +fn aas_default_port() -> u16 { + 5000 +} + +impl v1alpha1::Cache { + const fn default_entry_time_to_live() -> Duration { + Duration::from_minutes_unchecked(1) + } +} + +impl Default for v1alpha1::Cache { + fn default() -> Self { + Self { + entry_time_to_live: Self::default_entry_time_to_live(), + } + } +} diff --git a/rust/operator-binary/src/discovery.rs b/rust/operator-binary/src/discovery.rs index 2e00fb0b..1e7f7af4 100644 --- a/rust/operator-binary/src/discovery.rs +++ b/rust/operator-binary/src/discovery.rs @@ -1,5 +1,5 @@ use snafu::{OptionExt, ResultExt, Snafu}; -use stackable_opa_crd::{OpaCluster, OpaRole}; +use stackable_opa_operator::crd::v1alpha1; use stackable_operator::{ builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder}, commons::product_image_selection::ResolvedProductImage, @@ -15,7 +15,7 @@ pub enum Error { #[snafu(display("object {} is missing metadata to build owner reference", opa))] ObjectMissingMetadataForOwnerRef { source: stackable_operator::builder::meta::Error, - opa: ObjectRef, + opa: ObjectRef, }, #[snafu(display("object has no name associated"))] @@ -35,10 +35,10 @@ pub enum Error { }, } -/// Builds discovery [`ConfigMap`]s for connecting to a [`OpaCluster`] for all expected scenarios +/// Builds discovery [`ConfigMap`]s for connecting to a [`v1alpha1::OpaCluster`] for all expected scenarios pub fn build_discovery_configmaps( owner: &impl Resource, - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, svc: &Service, cluster_info: &KubernetesClusterInfo, @@ -54,11 +54,11 @@ pub fn build_discovery_configmaps( )?]) } -/// Build a discovery [`ConfigMap`] containing information about how to connect to a certain [`OpaCluster`] +/// Build a discovery [`ConfigMap`] containing information about how to connect to a certain [`v1alpha1::OpaCluster`] fn build_discovery_configmap( name: &str, owner: &impl Resource, - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, resolved_product_image: &ResolvedProductImage, svc: &Service, cluster_info: &KubernetesClusterInfo, @@ -85,7 +85,7 @@ fn build_discovery_configmap( .with_recommended_labels(build_recommended_labels( opa, &resolved_product_image.app_version_label, - &OpaRole::Server.to_string(), + &v1alpha1::OpaRole::Server.to_string(), "discovery", )) .context(ObjectMetaSnafu)? diff --git a/rust/operator-binary/src/lib.rs b/rust/operator-binary/src/lib.rs new file mode 100644 index 00000000..b89e9789 --- /dev/null +++ b/rust/operator-binary/src/lib.rs @@ -0,0 +1 @@ +pub mod crd; diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 61508e8d..45b79690 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use clap::{crate_description, crate_version, Parser}; use futures::StreamExt; use product_config::ProductConfigManager; -use stackable_opa_crd::{OpaCluster, APP_NAME, OPERATOR_NAME}; +use stackable_opa_operator::crd::{v1alpha1, OpaCluster, APP_NAME, OPERATOR_NAME}; use stackable_operator::{ cli::{Command, ProductOperatorRun}, client::{self, Client}, @@ -21,7 +21,8 @@ use stackable_operator::{ }, logging::controller::report_controller_reconciled, namespace::WatchNamespace, - CustomResourceExt, + shared::yaml::SerializeOptions, + YamlSchema, }; use crate::controller::OPA_FULL_CONTROLLER_NAME; @@ -57,7 +58,8 @@ async fn main() -> anyhow::Result<()> { let opts = Opts::parse(); match opts.cmd { Command::Crd => { - OpaCluster::print_yaml_schema(built_info::PKG_VERSION)?; + OpaCluster::merged_crd(OpaCluster::V1Alpha1)? + .print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?; } Command::Run(OpaRun { operator_image, @@ -115,7 +117,7 @@ async fn create_controller( opa_bundle_builder_image: String, user_info_fetcher_image: String, ) { - let opa_api: Api> = watch_namespace.get_api(&client); + let opa_api: Api> = watch_namespace.get_api(&client); let daemonsets_api: Api> = watch_namespace.get_api(&client); let configmaps_api: Api> = watch_namespace.get_api(&client); let services_api: Api> = watch_namespace.get_api(&client); diff --git a/rust/operator-binary/src/operations/graceful_shutdown.rs b/rust/operator-binary/src/operations/graceful_shutdown.rs index bda64210..cd0f9805 100644 --- a/rust/operator-binary/src/operations/graceful_shutdown.rs +++ b/rust/operator-binary/src/operations/graceful_shutdown.rs @@ -1,5 +1,5 @@ use snafu::{ResultExt, Snafu}; -use stackable_opa_crd::{OpaConfig, SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD}; +use stackable_opa_operator::crd::{v1alpha1, SERVER_GRACEFUL_SHUTDOWN_SAFETY_OVERHEAD}; use stackable_operator::builder::pod::PodBuilder; #[derive(Debug, Snafu)] @@ -11,7 +11,7 @@ pub enum Error { } pub fn add_graceful_shutdown_config( - merged_config: &OpaConfig, + merged_config: &v1alpha1::OpaConfig, pod_builder: &mut PodBuilder, ) -> Result<(), Error> { // This must be always set by the merge mechanism, as we provide a default value, diff --git a/rust/operator-binary/src/product_logging.rs b/rust/operator-binary/src/product_logging.rs index e79dc566..bf58e831 100644 --- a/rust/operator-binary/src/product_logging.rs +++ b/rust/operator-binary/src/product_logging.rs @@ -1,5 +1,5 @@ use snafu::{OptionExt, ResultExt, Snafu}; -use stackable_opa_crd::{Container, OpaCluster}; +use stackable_opa_operator::crd::v1alpha1; use stackable_operator::{ builder::configmap::ConfigMapBuilder, client::Client, @@ -77,7 +77,7 @@ impl From for BundleBuilderLogLevel { /// Return the address of the Vector aggregator if the corresponding ConfigMap name is given in the /// cluster spec pub async fn resolve_vector_aggregator_address( - opa: &OpaCluster, + opa: &v1alpha1::OpaCluster, client: &Client, ) -> Result> { let vector_aggregator_address = if let Some(vector_aggregator_config_map_name) = @@ -110,14 +110,14 @@ pub async fn resolve_vector_aggregator_address( /// Extend the role group ConfigMap with logging and Vector configurations pub fn extend_role_group_config_map( - rolegroup: &RoleGroupRef, + rolegroup: &RoleGroupRef, vector_aggregator_address: Option<&str>, - logging: &Logging, + logging: &Logging, cm_builder: &mut ConfigMapBuilder, ) -> Result<()> { let vector_log_config = if let Some(ContainerLogConfig { choice: Some(ContainerLogConfigChoice::Automatic(log_config)), - }) = logging.containers.get(&Container::Vector) + }) = logging.containers.get(&v1alpha1::Container::Vector) { Some(log_config) } else { diff --git a/rust/user-info-fetcher/Cargo.toml b/rust/user-info-fetcher/Cargo.toml index be013f73..faf97d5b 100644 --- a/rust/user-info-fetcher/Cargo.toml +++ b/rust/user-info-fetcher/Cargo.toml @@ -9,7 +9,7 @@ repository.workspace = true publish = false [dependencies] -stackable-opa-crd = { path = "../crd" } +stackable-opa-operator = { path = "../operator-binary" } axum.workspace = true base64.workspace = true diff --git a/rust/user-info-fetcher/src/backend/keycloak.rs b/rust/user-info-fetcher/src/backend/keycloak.rs index 9bd76f6e..85f61ec1 100644 --- a/rust/user-info-fetcher/src/backend/keycloak.rs +++ b/rust/user-info-fetcher/src/backend/keycloak.rs @@ -3,7 +3,7 @@ use std::collections::HashMap; use hyper::StatusCode; use serde::Deserialize; use snafu::{OptionExt, ResultExt, Snafu}; -use stackable_opa_crd::user_info_fetcher as crd; +use stackable_opa_operator::crd::user_info_fetcher::v1alpha1; use stackable_operator::commons::authentication::oidc; use crate::{http_error, utils::http::send_json_request, Credentials, UserInfo, UserInfoRequest}; @@ -90,9 +90,9 @@ pub(crate) async fn get_user_info( req: &UserInfoRequest, http: &reqwest::Client, credentials: &Credentials, - config: &crd::KeycloakBackend, + config: &v1alpha1::KeycloakBackend, ) -> Result { - let crd::KeycloakBackend { + let v1alpha1::KeycloakBackend { client_credentials_secret: _, admin_realm, user_realm, diff --git a/rust/user-info-fetcher/src/backend/xfsc_aas.rs b/rust/user-info-fetcher/src/backend/xfsc_aas.rs index 40e05628..693cdfe9 100644 --- a/rust/user-info-fetcher/src/backend/xfsc_aas.rs +++ b/rust/user-info-fetcher/src/backend/xfsc_aas.rs @@ -15,7 +15,7 @@ use std::collections::HashMap; use hyper::StatusCode; use serde::Deserialize; use snafu::{ResultExt, Snafu}; -use stackable_opa_crd::user_info_fetcher as crd; +use stackable_opa_operator::crd::user_info_fetcher::v1alpha1; use url::Url; use crate::{http_error, utils::http::send_json_request, UserInfo, UserInfoRequest}; @@ -81,9 +81,9 @@ impl TryFrom for UserInfo { pub(crate) async fn get_user_info( req: &UserInfoRequest, http: &reqwest::Client, - config: &crd::AasBackend, + config: &v1alpha1::AasBackend, ) -> Result { - let crd::AasBackend { hostname, port } = config; + let v1alpha1::AasBackend { hostname, port } = config; let cip_endpoint_raw = format!("http://{hostname}:{port}{API_PATH}"); let cip_endpoint = Url::parse(&cip_endpoint_raw).context(ParseAasEndpointUrlSnafu { diff --git a/rust/user-info-fetcher/src/main.rs b/rust/user-info-fetcher/src/main.rs index aedd197f..5372ac4c 100644 --- a/rust/user-info-fetcher/src/main.rs +++ b/rust/user-info-fetcher/src/main.rs @@ -12,7 +12,7 @@ use moka::future::Cache; use reqwest::ClientBuilder; use serde::{Deserialize, Serialize}; use snafu::{ResultExt, Snafu}; -use stackable_opa_crd::user_info_fetcher as crd; +use stackable_opa_operator::crd::user_info_fetcher::v1alpha1; use tokio::net::TcpListener; mod backend; @@ -33,7 +33,7 @@ pub struct Args { #[derive(Clone)] struct AppState { - config: Arc, + config: Arc, http: reqwest::Client, credentials: Arc, user_info_cache: Cache, @@ -100,24 +100,24 @@ async fn main() -> Result<(), StartupError> { } }; - let config = Arc::::new( + let config = Arc::::new( serde_json::from_str(&read_config_file(&args.config).await?).context(ParseConfigSnafu)?, ); let credentials = Arc::new(match &config.backend { // TODO: factor this out into each backend (e.g. when we add LDAP support) - crd::Backend::None {} => Credentials { + v1alpha1::Backend::None {} => Credentials { client_id: "".to_string(), client_secret: "".to_string(), }, - crd::Backend::Keycloak(_) => Credentials { + v1alpha1::Backend::Keycloak(_) => Credentials { client_id: read_config_file(&args.credentials_dir.join("clientId")).await?, client_secret: read_config_file(&args.credentials_dir.join("clientSecret")).await?, }, - crd::Backend::ExperimentalXfscAas(_) => Credentials { + v1alpha1::Backend::ExperimentalXfscAas(_) => Credentials { client_id: "".to_string(), client_secret: "".to_string(), }, - crd::Backend::ActiveDirectory(_) => Credentials { + v1alpha1::Backend::ActiveDirectory(_) => Credentials { client_id: "".to_string(), client_secret: "".to_string(), }, @@ -129,7 +129,7 @@ async fn main() -> Result<(), StartupError> { // We could factor it out in the provider specific implementation (e.g. when we add LDAP support). // I know it is for setting up the client, but an idea: make a trait for implementing backends // The trait can do all this for a genric client using an implementation on the trait (eg: get_http_client() which will call self.uses_tls()) - if let crd::Backend::Keycloak(keycloak) = &config.backend { + if let v1alpha1::Backend::Keycloak(keycloak) = &config.backend { client_builder = utils::tls::configure_reqwest(&keycloak.tls, client_builder) .await .context(ConfigureTlsSnafu)?; @@ -137,7 +137,7 @@ async fn main() -> Result<(), StartupError> { let http = client_builder.build().context(ConstructHttpClientSnafu)?; let user_info_cache = { - let crd::Cache { entry_time_to_live } = config.cache; + let v1alpha1::Cache { entry_time_to_live } = config.cache; Cache::builder() .name("user-info") .time_to_live(*entry_time_to_live) @@ -262,7 +262,7 @@ async fn get_user_info( user_info_cache .try_get_with_by_ref(&req, async { match &config.backend { - crd::Backend::None {} => { + v1alpha1::Backend::None {} => { let user_id = match &req { UserInfoRequest::UserInfoRequestById(UserInfoRequestById { id }) => { Some(id) @@ -282,25 +282,27 @@ async fn get_user_info( custom_attributes: HashMap::new(), }) } - crd::Backend::Keycloak(keycloak) => { + v1alpha1::Backend::Keycloak(keycloak) => { backend::keycloak::get_user_info(&req, &http, &credentials, keycloak) .await .context(get_user_info_error::KeycloakSnafu) } - crd::Backend::ExperimentalXfscAas(aas) => { + v1alpha1::Backend::ExperimentalXfscAas(aas) => { backend::xfsc_aas::get_user_info(&req, &http, aas) .await .context(get_user_info_error::ExperimentalXfscAasSnafu) } - crd::Backend::ActiveDirectory(ad) => backend::active_directory::get_user_info( - &req, - &ad.ldap_server, - &ad.tls, - &ad.base_distinguished_name, - &ad.custom_attribute_mappings, - ) - .await - .context(get_user_info_error::ActiveDirectorySnafu), + v1alpha1::Backend::ActiveDirectory(ad) => { + backend::active_directory::get_user_info( + &req, + &ad.ldap_server, + &ad.tls, + &ad.base_distinguished_name, + &ad.custom_attribute_mappings, + ) + .await + .context(get_user_info_error::ActiveDirectorySnafu) + } } }) .await?,