diff --git a/CHANGELOG.md b/CHANGELOG.md index 10945e379..41fe01385 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,13 @@ All notable changes to this project will be documented in this file. ### Changed +- BREAKING: `configOverrides` now only accepts the supported config file names + (`config.properties`, `node.properties`, `log.properties`, `security.properties`, + `access-control.properties`, `exchange-manager.properties`, + `spooling-manager.properties`). Previously arbitrary keys were silently accepted + but ignored ([#878]). - Document Helm deployed RBAC permissions and remove unnecessary permissions ([#869]). -- Bump stackable-operator to 0.109.0 ([#877]). -- Warn when an unsupported OIDC client authentication method is configured ([#877]). +- Bump `stackable-operator` to 0.110.0 and `kube` to 3.1.0 ([#878]). ### Fixed @@ -19,7 +23,7 @@ All notable changes to this project will be documented in this file. [#869]: https://github.com/stackabletech/trino-operator/pull/869 [#876]: https://github.com/stackabletech/trino-operator/pull/876 -[#877]: https://github.com/stackabletech/trino-operator/pull/877 +[#878]: https://github.com/stackabletech/trino-operator/pull/878 ## [26.3.0] - 2026-03-16 diff --git a/Cargo.lock b/Cargo.lock index 34ab88907..805443de8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "darling", "regex", @@ -1528,8 +1528,9 @@ dependencies = [ [[package]] name = "kube" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acc5a6a69da2975ed9925d56b5dcfc9cc739b66f37add06785b7c9f6d1e88741" dependencies = [ "k8s-openapi", "kube-client", @@ -1540,8 +1541,9 @@ dependencies = [ [[package]] name = "kube-client" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcaf2d1f1a91e1805d4cd82e8333c022767ae8ffd65909bbef6802733a7dd40" dependencies = [ "base64", "bytes", @@ -1574,8 +1576,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f126d2db7a8b532ec1d839ece2a71e2485dc3bbca6cc3c3f929becaa810e719e" dependencies = [ "derive_more", "form_urlencoded", @@ -1592,8 +1595,9 @@ dependencies = [ [[package]] name = "kube-derive" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b9b97e121fce957f9cafc6da534abc4276983ab03190b76c09361e2df849fa" dependencies = [ "darling", "proc-macro2", @@ -1605,8 +1609,9 @@ dependencies = [ [[package]] name = "kube-runtime" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c072737075826ee74d3e615e80334e41e617ca3d14fb46ef7cdfda822d6f15f2" dependencies = [ "ahash", "async-broadcast", @@ -2871,7 +2876,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "const-oid", "ecdsa", @@ -2894,8 +2899,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.109.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +version = "0.110.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "base64", "clap", @@ -2936,7 +2941,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2952,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2969,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "axum", "clap", @@ -3011,7 +3016,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "schemars", "serde", @@ -3024,7 +3029,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "convert_case", "convert_case_extras", @@ -3042,7 +3047,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#a4a204b0696a696b9a49c930703037dd124e876d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#95490f2d703d20cf1895e5976fdc5fb8f02aa293" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 9ff9d3455..eed322d6d 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4846,7 +4846,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "k8s_version"; @@ -4876,14 +4876,9 @@ rec { }; "kube" = rec { crateName = "kube"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "0hc7x38zdjdphmkx1b9pdyv3kiwwzkfbamjxjbcmx5x2knkadidc"; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -4954,14 +4949,9 @@ rec { }; "kube-client" = rec { crateName = "kube-client"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "0h6xlwrjg07npsdr0rgxiyp6f9q27hryi0ndsh2ih7m9y78z5jhg"; libName = "kube_client"; authors = [ "clux " @@ -5087,7 +5077,7 @@ rec { name = "tokio"; packageId = "tokio"; optional = true; - features = [ "time" "signal" "sync" ]; + features = [ "time" "signal" "sync" "rt" ]; } { name = "tokio-util"; @@ -5187,14 +5177,9 @@ rec { }; "kube-core" = rec { crateName = "kube-core"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "17ki1s0smv4vj8zkrk56phxxr1943sky5v1rv30jwlwbgbdx49pi"; libName = "kube_core"; authors = [ "clux " @@ -5274,14 +5259,9 @@ rec { }; "kube-derive" = rec { crateName = "kube-derive"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "1yj9z0niwdh9djvr0cdh7ac7chmw999xmimgkizrbkhz29zbkffn"; procMacro = true; libName = "kube_derive"; authors = [ @@ -5328,14 +5308,9 @@ rec { }; "kube-runtime" = rec { crateName = "kube-runtime"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "1whmdwnq5nnzgkpldyql7p51grj19qrq0pk17r6yfvl2fmq76wn0"; libName = "kube_runtime"; authors = [ "clux " @@ -9501,7 +9476,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_certs"; @@ -9599,12 +9574,12 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.109.0"; + version = "0.110.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_operator"; @@ -9784,7 +9759,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; procMacro = true; @@ -9819,7 +9794,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_shared"; @@ -9900,7 +9875,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_telemetry"; @@ -10111,7 +10086,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_versioned"; @@ -10155,7 +10130,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; procMacro = true; @@ -10223,7 +10198,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "a4a204b0696a696b9a49c930703037dd124e876d"; + rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; }; libName = "stackable_webhook"; diff --git a/Cargo.toml b/Cargo.toml index 9a87b0bef..74aeb8b6c 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", tag = "stackable-operator-0.109.0", features = ["webhook"] } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.0", features = ["webhook"] } anyhow = "1.0" async-trait = "0.1" diff --git a/crate-hashes.json b/crate-hashes.json index d1cdd35a7..33e75762e 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,17 +1,12 @@ { - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-client@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-core@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-derive@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-runtime@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#k8s-version@0.1.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-certs@0.4.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-operator-derive@0.3.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-operator@0.109.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-shared@0.1.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-telemetry@0.6.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-versioned-macros@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-versioned@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.109.0#stackable-webhook@0.9.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#k8s-version@0.1.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-certs@0.4.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator-derive@0.3.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator@0.110.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-shared@0.1.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-telemetry@0.6.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned-macros@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-webhook@0.9.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", "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/extra/crds.yaml b/extra/crds.yaml index 59ef224b6..4729af1dd 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -45,16 +45,6 @@ spec: description: This field contains OIDC-specific configuration. It is only required in case OIDC is used. nullable: true properties: - clientAuthenticationMethod: - default: client_secret_basic - description: 'The client authentication method used when communicating with the token endpoint. Defaults to `client_secret_basic`. The required contents of `clientCredentialsSecret` depend on the chosen method: secret-based methods (`client_secret_basic`, `client_secret_post`, `client_secret_jwt`) expect a client secret, while `private_key_jwt` expects a private key.' - enum: - - client_secret_basic - - client_secret_post - - client_secret_jwt - - private_key_jwt - - none - type: string clientCredentialsSecret: description: |- A reference to the OIDC client credentials secret. The secret contains @@ -1052,7 +1042,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1132,7 +1122,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1212,7 +1202,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1292,7 +1282,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1420,17 +1410,83 @@ spec: type: object type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + access-control.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + config.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + exchange-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + log.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + node.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + security.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + spooling-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object type: object envOverrides: additionalProperties: @@ -1613,7 +1669,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1693,7 +1749,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1773,7 +1829,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1853,7 +1909,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1981,17 +2037,83 @@ spec: type: object type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + access-control.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + config.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + exchange-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + log.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + node.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + security.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + spooling-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object type: object envOverrides: additionalProperties: @@ -2219,7 +2341,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2299,7 +2421,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2379,7 +2501,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2459,7 +2581,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2587,17 +2709,83 @@ spec: type: object type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + access-control.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + config.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + exchange-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + log.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + node.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + security.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + spooling-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object type: object envOverrides: additionalProperties: @@ -2775,7 +2963,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2855,7 +3043,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -2935,7 +3123,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -3015,7 +3203,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -3143,17 +3331,83 @@ spec: type: object type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + access-control.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + config.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + exchange-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + log.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + node.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + security.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object + spooling-manager.properties: + additionalProperties: + type: string + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + nullable: true + type: object type: object envOverrides: additionalProperties: diff --git a/rust/operator-binary/src/authentication/mod.rs b/rust/operator-binary/src/authentication/mod.rs index 9d7ba649f..b5386f0df 100644 --- a/rust/operator-binary/src/authentication/mod.rs +++ b/rust/operator-binary/src/authentication/mod.rs @@ -507,14 +507,6 @@ impl TryFrom> for TrinoAuthenticationTypes { auth_class_name: auth_class_name.clone(), }, )?; - if oidc.client_authentication_method - != stackable_operator::crd::authentication::oidc::v1alpha1::ClientAuthenticationMethod::default() - { - tracing::warn!( - "Trino does not support configuring the OIDC client authentication method. \ - The setting will be ignored and Trino will use its default method." - ); - } oidc_authenticators.push(OidcAuthenticator::new( auth_class_name, provider, @@ -670,7 +662,6 @@ mod tests { client_auth_options: Some(oidc::v1alpha1::ClientAuthenticationOptions { client_credentials_secret_ref: "my-oidc-secret".to_string(), extra_scopes: Vec::new(), - client_authentication_method: Default::default(), product_specific_fields: (), }), } diff --git a/rust/operator-binary/src/authorization/opa.rs b/rust/operator-binary/src/authorization/opa.rs index 3d6c8146e..1fa9bd95f 100644 --- a/rust/operator-binary/src/authorization/opa.rs +++ b/rust/operator-binary/src/authorization/opa.rs @@ -44,7 +44,7 @@ impl TrinoOpaConfig { ) -> Result { let non_batched_connection_string = opa_config .opa - .full_document_url_from_config_map(client, trino, Some("allow"), OpaApiVersion::V1) + .full_document_url_from_config_map(client, trino, Some("allow"), &OpaApiVersion::V1) .await?; let batched_connection_string = opa_config .opa @@ -53,7 +53,7 @@ impl TrinoOpaConfig { trino, // Sticking to example https://trino.io/docs/current/security/opa-access-control.html Some("batch"), - OpaApiVersion::V1, + &OpaApiVersion::V1, ) .await?; let row_filters_connection_string = opa_config @@ -63,7 +63,7 @@ impl TrinoOpaConfig { trino, // Sticking to https://github.com/trinodb/trino/blob/455/plugin/trino-opa/src/test/java/io/trino/plugin/opa/TestOpaAccessControlDataFilteringSystem.java#L46 Some("rowFilters"), - OpaApiVersion::V1, + &OpaApiVersion::V1, ) .await?; @@ -76,7 +76,7 @@ impl TrinoOpaConfig { trino, // Sticking to https://github.com/trinodb/trino/blob/455/plugin/trino-opa/src/test/java/io/trino/plugin/opa/TestOpaAccessControlDataFilteringSystem.java#L48 Some("batchColumnMasks"), - OpaApiVersion::V1, + &OpaApiVersion::V1, ) .await?, ) diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index fde130cf4..0fa18c674 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -3,12 +3,12 @@ use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ memory::{BinaryMultiple, MemoryQuantity}, - role_utils::{self, GenericRoleConfig, JavaCommonConfig, JvmArgumentOverrides, Role}, + role_utils::{self, JvmArgumentOverrides}, }; use crate::crd::{ JVM_HEAP_FACTOR, JVM_SECURITY_PROPERTIES, METRICS_PORT, RW_CONFIG_DIR_NAME, - STACKABLE_CLIENT_TLS_DIR, STACKABLE_TLS_STORE_PASSWORD, v1alpha1, + STACKABLE_CLIENT_TLS_DIR, STACKABLE_TLS_STORE_PASSWORD, TrinoRoleType, v1alpha1, }; #[derive(Snafu, Debug)] @@ -42,7 +42,7 @@ pub enum Error { pub fn jvm_config( product_version: u16, merged_config: &v1alpha1::TrinoConfig, - role: &Role, + role: &TrinoRoleType, role_group: &str, ) -> Result { let memory_unit = BinaryMultiple::Mebi; diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index ee6b731fe..34f27b9e4 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -66,7 +66,7 @@ use stackable_operator::{ CustomContainerLogConfig, }, }, - role_utils::{GenericRoleConfig, JavaCommonConfig, Role, RoleGroupRef}, + role_utils::{GenericRoleConfig, RoleGroupRef}, shared::time::Duration, status::condition::{ compute_conditions, operations::ClusterOperationsConditionBuilder, @@ -90,7 +90,7 @@ use crate::{ METRICS_PORT_NAME, NODE_PROPERTIES, RW_CONFIG_DIR_NAME, SPOOLING_MANAGER_PROPERTIES, STACKABLE_CLIENT_TLS_DIR, STACKABLE_INTERNAL_TLS_DIR, STACKABLE_MOUNT_INTERNAL_TLS_DIR, STACKABLE_MOUNT_SERVER_TLS_DIR, STACKABLE_SERVER_TLS_DIR, STACKABLE_TLS_STORE_PASSWORD, - TrinoRole, + TrinoRole, TrinoRoleType, authentication::resolve_authentication_classes, catalog, discovery::{TrinoDiscovery, TrinoDiscoveryProtocol, TrinoPodRef}, @@ -739,7 +739,7 @@ pub async fn reconcile_trino( fn build_rolegroup_config_map( trino: &v1alpha1::TrinoCluster, resolved_product_image: &ResolvedProductImage, - role: &Role, + role: &TrinoRoleType, trino_role: &TrinoRole, rolegroup_ref: &RoleGroupRef, config: &HashMap>, @@ -960,7 +960,7 @@ fn build_rolegroup_config_map( .name(rolegroup_ref.object_name()) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( trino, &resolved_product_image.app_version_label_value, &rolegroup_ref.role, @@ -991,7 +991,7 @@ fn build_rolegroup_catalog_config_map( .name(format!("{}-catalog", rolegroup_ref.object_name())) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( trino, &resolved_product_image.app_version_label_value, &rolegroup_ref.role, @@ -1221,7 +1221,7 @@ fn build_rolegroup_statefulset( .context(AddVolumeMountSnafu)?; // Used for PVC templates that cannot be modified once they are deployed - let unversioned_recommended_labels = Labels::recommended(build_recommended_labels( + let unversioned_recommended_labels = Labels::recommended(&build_recommended_labels( trino, // A version value is required, and we do want to use the "recommended" format for the other desired labels "none", @@ -1328,7 +1328,7 @@ fn build_rolegroup_statefulset( } let metadata = ObjectMetaBuilder::new() - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( trino, &resolved_product_image.app_version_label_value, &role_group_ref.role, @@ -1387,7 +1387,7 @@ fn build_rolegroup_statefulset( .name(role_group_ref.object_name()) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( trino, &resolved_product_image.app_version_label_value, &role_group_ref.role, @@ -1505,7 +1505,7 @@ fn validated_product_config( ); let role_config = - transform_all_roles_to_config(trino, roles).context(ProductConfigTransformSnafu)?; + transform_all_roles_to_config(trino, &roles).context(ProductConfigTransformSnafu)?; validate_all_roles_and_groups_config(version, &role_config, product_config, false, false) .context(InvalidProductConfigSnafu) @@ -1979,7 +1979,7 @@ mod tests { &format!("{}.0.0", resolved_product_image.product_version), &transform_all_roles_to_config( &trino, - [ + &HashMap::from([ ( TrinoRole::Coordinator.to_string(), ( @@ -1991,8 +1991,7 @@ mod tests { TrinoRole::Worker.to_string(), (config_files, trino.role(&TrinoRole::Worker).unwrap()), ), - ] - .into(), + ]), ) .unwrap(), // Using this instead of ProductConfigManager::from_yaml_file, as that did not find the file diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index d6f1eadd7..a326a1cb3 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -25,6 +25,7 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, + config_overrides::{KeyValueConfigOverrides, KeyValueOverridesProvider}, crd::authentication::core, deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::{api::resource::Quantity, apis::meta::v1::LabelSelector}, @@ -42,9 +43,25 @@ use stackable_operator::{ versioned::versioned, }; use strum::{Display, EnumIter, EnumString, IntoEnumIterator}; -use v1alpha1::TrinoConfigFragment; -use crate::crd::{discovery::TrinoPodRef, v1alpha1::TrinoCoordinatorRoleConfig}; +use crate::crd::discovery::TrinoPodRef; + +pub type TrinoCoordinatorRoleType = Role< + v1alpha1::TrinoConfigFragment, + v1alpha1::TrinoConfigOverrides, + v1alpha1::TrinoCoordinatorRoleConfig, + JavaCommonConfig, +>; + +pub type TrinoRoleType = Role< + v1alpha1::TrinoConfigFragment, + v1alpha1::TrinoConfigOverrides, + GenericRoleConfig, + JavaCommonConfig, +>; + +pub type TrinoRoleGroupType = + RoleGroup; pub const FIELD_MANAGER: &str = "trino-operator"; pub const APP_NAME: &str = "trino"; @@ -213,12 +230,64 @@ pub mod versioned { // no doc - it's in the struct. #[serde(default, skip_serializing_if = "Option::is_none")] - pub coordinators: - Option>, + pub coordinators: Option, // no doc - it's in the struct. #[serde(default, skip_serializing_if = "Option::is_none")] - pub workers: Option>, + pub workers: Option, + } + + #[derive(Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[serde(rename_all = "camelCase")] + pub struct TrinoConfigOverrides { + #[serde( + default, + rename = "config.properties", + skip_serializing_if = "Option::is_none" + )] + pub config_properties: Option, + + #[serde( + default, + rename = "node.properties", + skip_serializing_if = "Option::is_none" + )] + pub node_properties: Option, + + #[serde( + default, + rename = "log.properties", + skip_serializing_if = "Option::is_none" + )] + pub log_properties: Option, + + #[serde( + default, + rename = "security.properties", + skip_serializing_if = "Option::is_none" + )] + pub security_properties: Option, + + #[serde( + default, + rename = "access-control.properties", + skip_serializing_if = "Option::is_none" + )] + pub access_control_properties: Option, + + #[serde( + default, + rename = "exchange-manager.properties", + skip_serializing_if = "Option::is_none" + )] + pub exchange_manager_properties: Option, + + #[serde( + default, + rename = "spooling-manager.properties", + skip_serializing_if = "Option::is_none" + )] + pub spooling_manager_properties: Option, } // TODO: move generic version to op-rs? @@ -391,6 +460,24 @@ impl v1alpha1::TrinoAuthorizationOpaConfig { } } +impl KeyValueOverridesProvider for v1alpha1::TrinoConfigOverrides { + fn get_key_value_overrides(&self, file: &str) -> BTreeMap> { + let field = match file { + CONFIG_PROPERTIES => self.config_properties.as_ref(), + NODE_PROPERTIES => self.node_properties.as_ref(), + LOG_PROPERTIES => self.log_properties.as_ref(), + JVM_SECURITY_PROPERTIES => self.security_properties.as_ref(), + ACCESS_CONTROL_PROPERTIES => self.access_control_properties.as_ref(), + EXCHANGE_MANAGER_PROPERTIES => self.exchange_manager_properties.as_ref(), + SPOOLING_MANAGER_PROPERTIES => self.spooling_manager_properties.as_ref(), + _ => None, + }; + field + .map(KeyValueConfigOverrides::as_product_config_overrides) + .unwrap_or_default() + } +} + impl Default for v1alpha1::TrinoCoordinatorRoleConfig { fn default() -> Self { v1alpha1::TrinoCoordinatorRoleConfig { @@ -781,11 +868,7 @@ impl v1alpha1::TrinoCluster { } /// Returns a reference to the role. Raises an error if the role is not defined. - pub fn role( - &self, - role_variant: &TrinoRole, - ) -> Result, Error> - { + pub fn role(&self, role_variant: &TrinoRole) -> Result { match role_variant { TrinoRole::Coordinator => self .spec @@ -803,7 +886,7 @@ impl v1alpha1::TrinoCluster { pub fn rolegroup( &self, rolegroup_ref: &RoleGroupRef, - ) -> Result, Error> { + ) -> Result { let trino_role = TrinoRole::from_str(&rolegroup_ref.role).with_context(|_| UnknownTrinoRoleSnafu { role: rolegroup_ref.role.to_owned(), @@ -986,9 +1069,7 @@ impl v1alpha1::TrinoCluster { } } -fn extract_role_from_coordinator_config( - fragment: Role, -) -> Role { +fn extract_role_from_coordinator_config(fragment: TrinoCoordinatorRoleType) -> TrinoRoleType { Role { config: CommonConfiguration { config: fragment.config.config, diff --git a/rust/operator-binary/src/listener.rs b/rust/operator-binary/src/listener.rs index aa4df0b38..ef12ef0d3 100644 --- a/rust/operator-binary/src/listener.rs +++ b/rust/operator-binary/src/listener.rs @@ -45,7 +45,7 @@ pub fn build_group_listener( .name(listener_group_name) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(object_labels) + .with_recommended_labels(&object_labels) .context(BuildObjectMetaSnafu)? .build(), spec: ListenerSpec { diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index b1738ac83..bd28c0d1b 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -72,9 +72,9 @@ async fn main() -> anyhow::Result<()> { match opts.cmd { Command::Crd => { TrinoCluster::merged_crd(TrinoClusterVersion::V1Alpha1)? - .print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?; + .print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?; TrinoCatalog::merged_crd(TrinoCatalogVersion::V1Alpha1)? - .print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?; + .print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?; } Command::Run(RunArguments { operator_environment, @@ -105,7 +105,7 @@ async fn main() -> anyhow::Result<()> { let sigterm_watcher = SignalWatcher::sigterm()?; let eos_checker = - EndOfSupportChecker::new(built_info::BUILT_TIME_UTC, maintenance.end_of_support)? + EndOfSupportChecker::new(built_info::BUILT_TIME_UTC, &maintenance.end_of_support)? .run(sigterm_watcher.handle()) .map(anyhow::Ok); diff --git a/rust/operator-binary/src/service.rs b/rust/operator-binary/src/service.rs index 3fbfe96d1..1ee44bad2 100644 --- a/rust/operator-binary/src/service.rs +++ b/rust/operator-binary/src/service.rs @@ -42,7 +42,7 @@ pub fn build_rolegroup_headless_service( .name(role_group_ref.rolegroup_headless_service_name()) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(object_labels) + .with_recommended_labels(&object_labels) .context(MetadataBuildSnafu)? .build(), spec: Some(ServiceSpec { @@ -71,7 +71,7 @@ pub fn build_rolegroup_metrics_service( .name(role_group_ref.rolegroup_metrics_service_name()) .ownerreference_from_resource(trino, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(object_labels) + .with_recommended_labels(&object_labels) .context(MetadataBuildSnafu)? .with_labels(prometheus_labels()) .with_annotations(prometheus_annotations())