diff --git a/CHANGELOG.md b/CHANGELOG.md index ceb07b2d..0ee2676d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- Support objectOverrides using `.spec.objectOverrides`. + See [objectOverrides concepts page](https://docs.stackable.tech/home/nightly/concepts/overrides/#object-overrides) for details ([#831]). + +### Changed + +- Pin k8s-openapi to `0.26.0` ([#831]). + +[#831]: https://github.com/stackabletech/trino-operator/pull/831 + ## [25.11.0] - 2025-11-07 ## [25.11.0-rc1] - 2025-11-06 diff --git a/Cargo.lock b/Cargo.lock index 13f99984..8b7f6a20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -386,9 +386,9 @@ dependencies = [ [[package]] name = "convert_case" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -458,8 +458,18 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", ] [[package]] @@ -476,13 +486,37 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.108", +] + [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core", + "darling_core 0.21.3", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", "quote", "syn 2.0.108", ] @@ -1353,9 +1387,9 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ - "darling", + "darling 0.23.0", "regex", "snafu 0.8.9", ] @@ -1430,7 +1464,7 @@ name = "kube-derive" version = "2.0.1" source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ - "darling", + "darling 0.21.3", "proc-macro2", "quote", "serde", @@ -2504,8 +2538,8 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-operator" -version = "0.100.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +version = "0.101.2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "chrono", "clap", @@ -2543,9 +2577,9 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.108", @@ -2554,7 +2588,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "chrono", "k8s-openapi", @@ -2571,7 +2605,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "axum", "clap", @@ -2603,6 +2637,7 @@ dependencies = [ "const_format", "futures 0.3.31", "indoc", + "k8s-openapi", "openssl", "product-config", "rstest", @@ -2619,7 +2654,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "schemars", "serde", @@ -2632,10 +2667,10 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#184423db7409f853bd69db7eeecd1affbf97ef40" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "convert_case", - "darling", + "darling 0.23.0", "indoc", "itertools", "k8s-openapi", diff --git a/Cargo.nix b/Cargo.nix index 83b0e3de..0f178fe0 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -1233,9 +1233,9 @@ rec { }; "convert_case" = rec { crateName = "convert_case"; - version = "0.8.0"; + version = "0.10.0"; edition = "2021"; - sha256 = "17zqy79xlr1n7nc0n1mlnw5qpp8l2nbxrk13jixrhlavrbna1ams"; + sha256 = "1fff1x78mp2c233g68my0ag0zrmjdbym8bfyahjbfy4cxza5hd33"; authors = [ "rutrum " ]; @@ -1245,10 +1245,7 @@ rec { packageId = "unicode-segmentation"; } ]; - features = { - "rand" = [ "dep:rand" ]; - "random" = [ "rand" ]; - }; + }; "core-foundation" = rec { crateName = "core-foundation"; @@ -1405,7 +1402,7 @@ rec { "rand_core" = [ "dep:rand_core" ]; }; }; - "darling" = rec { + "darling 0.21.3" = rec { crateName = "darling"; version = "0.21.3"; edition = "2021"; @@ -1416,11 +1413,37 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.21.3"; + } + { + name = "darling_macro"; + packageId = "darling_macro 0.21.3"; + } + ]; + features = { + "default" = [ "suggestions" ]; + "diagnostics" = [ "darling_core/diagnostics" ]; + "serde" = [ "darling_core/serde" ]; + "suggestions" = [ "darling_core/suggestions" ]; + }; + resolvedDefaultFeatures = [ "default" "suggestions" ]; + }; + "darling 0.23.0" = rec { + crateName = "darling"; + version = "0.23.0"; + edition = "2021"; + sha256 = "179fj6p6ajw4dnkrik51wjhifxwy02x5zhligyymcb905zd17bi5"; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.23.0"; } { name = "darling_macro"; - packageId = "darling_macro"; + packageId = "darling_macro 0.23.0"; } ]; features = { @@ -1431,7 +1454,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "suggestions" ]; }; - "darling_core" = rec { + "darling_core 0.21.3" = rec { crateName = "darling_core"; version = "0.21.3"; edition = "2021"; @@ -1474,7 +1497,46 @@ rec { }; resolvedDefaultFeatures = [ "strsim" "suggestions" ]; }; - "darling_macro" = rec { + "darling_core 0.23.0" = rec { + crateName = "darling_core"; + version = "0.23.0"; + edition = "2021"; + sha256 = "1c033vrks38vpw8kwgd5w088dsr511kfz55n9db56prkgh7sarcq"; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "ident_case"; + packageId = "ident_case"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "strsim"; + packageId = "strsim"; + optional = true; + } + { + name = "syn"; + packageId = "syn 2.0.108"; + features = [ "full" "extra-traits" ]; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + "strsim" = [ "dep:strsim" ]; + "suggestions" = [ "strsim" ]; + }; + resolvedDefaultFeatures = [ "strsim" "suggestions" ]; + }; + "darling_macro 0.21.3" = rec { crateName = "darling_macro"; version = "0.21.3"; edition = "2021"; @@ -1486,7 +1548,32 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.21.3"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.108"; + } + ]; + + }; + "darling_macro 0.23.0" = rec { + crateName = "darling_macro"; + version = "0.23.0"; + edition = "2021"; + sha256 = "13fvzji9xyp304mgq720z5l0xgm54qj68jibwscagkynggn88fdc"; + procMacro = true; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.23.0"; } { name = "quote"; @@ -4207,7 +4294,7 @@ rec { "latest" = [ "v1_34" ]; "schemars" = [ "dep:schemars" ]; }; - resolvedDefaultFeatures = [ "schemars" "v1_34" ]; + resolvedDefaultFeatures = [ "default" "schemars" "std" "v1_34" ]; }; "k8s-version" = rec { crateName = "k8s-version"; @@ -4216,8 +4303,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "k8s_version"; authors = [ @@ -4226,7 +4313,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; optional = true; } { @@ -4320,7 +4407,7 @@ rec { "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" "ring" "runtime" "rustls-tls" ]; + resolvedDefaultFeatures = [ "admission" "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "ring" "runtime" "rustls-tls" ]; }; "kube-client" = rec { crateName = "kube-client"; @@ -4645,7 +4732,7 @@ rec { "schema" = [ "schemars" ]; "schemars" = [ "dep:schemars" ]; }; - resolvedDefaultFeatures = [ "json-patch" "jsonpatch" "schema" "schemars" ]; + resolvedDefaultFeatures = [ "admission" "json-patch" "jsonpatch" "schema" "schemars" ]; }; "kube-derive" = rec { crateName = "kube-derive"; @@ -4667,7 +4754,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.21.3"; } { name = "proc-macro2"; @@ -8147,13 +8234,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.100.1"; + version = "0.101.2"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_operator"; authors = [ @@ -8218,7 +8305,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "product-config"; @@ -8321,8 +8408,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -8332,7 +8419,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; } { name = "proc-macro2"; @@ -8356,8 +8443,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_shared"; authors = [ @@ -8380,7 +8467,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "schemars"; @@ -8438,8 +8525,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_telemetry"; authors = [ @@ -8582,6 +8669,10 @@ rec { name = "indoc"; packageId = "indoc"; } + { + name = "k8s-openapi"; + packageId = "k8s-openapi"; + } { name = "openssl"; packageId = "openssl"; @@ -8653,8 +8744,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_versioned"; authors = [ @@ -8697,8 +8788,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "184423db7409f853bd69db7eeecd1affbf97ef40"; - sha256 = "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -8712,7 +8803,7 @@ rec { } { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; } { name = "indoc"; @@ -8737,7 +8828,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "proc-macro2"; diff --git a/Cargo.toml b/Cargo.toml index f695e566..5fa3b89b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/trino-operator" [workspace.dependencies] product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.100.1" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.101.2" } anyhow = "1.0" async-trait = "0.1" @@ -32,6 +32,9 @@ strum = { version = "0.27", features = ["derive"] } tokio = { version = "1.40", features = ["full"] } tracing = "0.1" +# k8s-openapi 0.26.1 doesn't play well with our kube version: https://github.com/kube-rs/kube/issues/1869 +k8s-openapi = "=0.26.0" + # [patch."https://github.com/stackabletech/operator-rs.git"] # stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } diff --git a/crate-hashes.json b/crate-hashes.json index 601d768f..269d6950 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -4,12 +4,12 @@ "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-derive@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-runtime@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#k8s-version@0.1.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-operator-derive@0.3.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-operator@0.100.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-shared@0.0.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-telemetry@0.6.1": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-versioned-macros@0.8.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.1#stackable-versioned@0.8.3": "1a98klljvifnc168f1wc3d6szcry1lamxgjjdq89plr99p4b953l", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#k8s-version@0.1.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-operator-derive@0.3.1": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-operator@0.101.2": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-shared@0.0.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-telemetry@0.6.1": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-versioned-macros@0.8.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-versioned@0.8.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/deploy/helm/trino-operator/crds/crds.yaml b/deploy/helm/trino-operator/crds/crds.yaml index 9f66ef66..3f486e97 100644 --- a/deploy/helm/trino-operator/crds/crds.yaml +++ b/deploy/helm/trino-operator/crds/crds.yaml @@ -1608,6 +1608,20 @@ spec: nullable: true type: string type: object + objectOverrides: + default: [] + description: |- + A list of generic Kubernetes objects, which are merged into the objects that the operator + creates. + + List entries are arbitrary YAML objects, which need to be valid Kubernetes objects. + + Read the [Object overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides) + for more information. + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array workers: description: |- This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing diff --git a/rust/operator-binary/Cargo.toml b/rust/operator-binary/Cargo.toml index 07438665..2af61aee 100644 --- a/rust/operator-binary/Cargo.toml +++ b/rust/operator-binary/Cargo.toml @@ -28,6 +28,9 @@ serde_yaml.workspace = true serde.workspace = true serde_json.workspace = true +# k8s-openapi 0.26.1 doesn't play well with our kube version: https://github.com/kube-rs/kube/issues/1869 +k8s-openapi.workspace = true + [dev-dependencies] rstest.workspace = true serde_yaml.workspace = true diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index d8ddea6a..c578f96b 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -504,6 +504,7 @@ pub async fn reconcile_trino( CONTROLLER_NAME, &trino.object_ref(&()), ClusterResourceApplyStrategy::from(&trino.spec.cluster_operation), + &trino.spec.object_overrides, ) .context(CreateClusterResourcesSnafu)?; diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 61e7522a..3c738116 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -26,6 +26,7 @@ use stackable_operator::{ merge::Merge, }, crd::authentication::core, + deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::{api::resource::Quantity, apis::meta::v1::LabelSelector}, kube::{CustomResource, ResourceExt, runtime::reflector::ObjectRef}, memory::{BinaryMultiple, MemoryQuantity}, @@ -205,6 +206,10 @@ pub mod versioned { #[serde(default)] pub cluster_operation: ClusterOperation, + // no doc - it's in the struct. + #[serde(default)] + pub object_overrides: ObjectOverrides, + // no doc - it's in the struct. #[serde(default, skip_serializing_if = "Option::is_none")] pub coordinators: diff --git a/rust/operator-binary/src/operations/pdb.rs b/rust/operator-binary/src/operations/pdb.rs index 4f8a7bb7..b135cca9 100644 --- a/rust/operator-binary/src/operations/pdb.rs +++ b/rust/operator-binary/src/operations/pdb.rs @@ -31,7 +31,7 @@ pub async fn add_pdbs( trino: &v1alpha1::TrinoCluster, role: &TrinoRole, client: &Client, - cluster_resources: &mut ClusterResources, + cluster_resources: &mut ClusterResources<'_>, ) -> Result<(), Error> { if !pdb.enabled { return Ok(());