From e0b9d8ae4e785a594eb3e643d397d73b4a6b8d2d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 27 Jan 2026 11:02:21 +0100 Subject: [PATCH 1/2] chore: Make `TrinoCatalog.spec.connector.iceberg.metastore` optional --- CHANGELOG.md | 3 +++ deploy/helm/trino-operator/crds/crds.yaml | 9 ++++++--- rust/operator-binary/src/catalog/iceberg.rs | 20 ++++++++++--------- rust/operator-binary/src/crd/affinity.rs | 5 ++++- .../src/crd/catalog/iceberg.rs | 7 +++++-- 5 files changed, 29 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0ce169e..0ba81ec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ All notable changes to this project will be documented in this file. - BREAKING: The field `opa` in `authorization` is now a mandatory enum variant instead of being optional ([#827]). - BREAKING: The operator no longer sets `opa.policy.column-masking-uri` in `access-control.properties` but `opa.policy.batch-column-masking-uri` instead, allowing Trino to fetch multiple column masks in a single request ([#827]). +- Make `TrinoCatalog.spec.connector.iceberg.metastore` optional, as Iceberg also supports other catalogs, such as a REST catalog, + which (currently) can only be added using configOverrides ([#XXX]). ### Removed @@ -28,6 +30,7 @@ All notable changes to this project will be documented in this file. [#831]: https://github.com/stackabletech/trino-operator/pull/831 [#833]: https://github.com/stackabletech/trino-operator/pull/833 [#839]: https://github.com/stackabletech/trino-operator/pull/839 +[#XXX]: https://github.com/stackabletech/trino-operator/pull/XXX ## [25.11.0] - 2025-11-07 diff --git a/deploy/helm/trino-operator/crds/crds.yaml b/deploy/helm/trino-operator/crds/crds.yaml index 5ccd3d67..236906aa 100644 --- a/deploy/helm/trino-operator/crds/crds.yaml +++ b/deploy/helm/trino-operator/crds/crds.yaml @@ -2810,7 +2810,12 @@ spec: - configMap type: object metastore: - description: Mandatory connection to a Hive Metastore, which will be used as a storage for metadata. + description: |- + Optional connection to a Hive Metastore, which will be used as a storage for metadata. + + The connection is optional, as Iceberg also supports other catalogs, such as a REST catalog, + which (currently) can only be added using configOverrides. + nullable: true properties: configMap: description: Name of the [discovery ConfigMap](https://docs.stackable.tech/home/nightly/concepts/service_discovery) providing information about the Hive metastore. @@ -2970,8 +2975,6 @@ spec: reference: type: string type: object - required: - - metastore type: object tpcds: description: A [TPC-DS](https://docs.stackable.tech/home/nightly/trino/usage-guide/catalogs/tpcds) connector. diff --git a/rust/operator-binary/src/catalog/iceberg.rs b/rust/operator-binary/src/catalog/iceberg.rs index 114c268f..4ab4498a 100644 --- a/rust/operator-binary/src/catalog/iceberg.rs +++ b/rust/operator-binary/src/catalog/iceberg.rs @@ -24,15 +24,17 @@ impl ToCatalogConfig for IcebergConnector { // See https://trino.io/docs/current/connector/iceberg.html config.add_property("iceberg.security", "allow-all"); - self.metastore - .extend_catalog_config( - &mut config, - catalog_name, - catalog_namespace.clone(), - client, - trino_version, - ) - .await?; + if let Some(metastore) = &self.metastore { + metastore + .extend_catalog_config( + &mut config, + catalog_name, + catalog_namespace.clone(), + client, + trino_version, + ) + .await?; + } if let Some(ref s3) = self.s3 { s3.extend_catalog_config( diff --git a/rust/operator-binary/src/crd/affinity.rs b/rust/operator-binary/src/crd/affinity.rs index fecef696..cac09f42 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -22,7 +22,10 @@ pub fn get_affinity( .iter() .filter_map(|catalog| match &catalog.spec.connector { TrinoCatalogConnector::Hive(hive) => Some(&hive.metastore.config_map), - TrinoCatalogConnector::Iceberg(iceberg) => Some(&iceberg.metastore.config_map), + TrinoCatalogConnector::Iceberg(iceberg) => iceberg + .metastore + .as_ref() + .map(|metastore| &metastore.config_map), TrinoCatalogConnector::DeltaLake(delta_lake) => { Some(&delta_lake.metastore.config_map) } diff --git a/rust/operator-binary/src/crd/catalog/iceberg.rs b/rust/operator-binary/src/crd/catalog/iceberg.rs index 56e7f333..1b0425ae 100644 --- a/rust/operator-binary/src/crd/catalog/iceberg.rs +++ b/rust/operator-binary/src/crd/catalog/iceberg.rs @@ -11,8 +11,11 @@ use super::commons::{HdfsConnection, MetastoreConnection}; #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct IcebergConnector { - /// Mandatory connection to a Hive Metastore, which will be used as a storage for metadata. - pub metastore: MetastoreConnection, + /// Optional connection to a Hive Metastore, which will be used as a storage for metadata. + /// + /// The connection is optional, as Iceberg also supports other catalogs, such as a REST catalog, + /// which (currently) can only be added using configOverrides. + pub metastore: Option, /// Connection to an S3 store. /// Please make sure that the underlying Hive metastore also has access to the S3 store. From 806cc521a2746995ff60c201fdefee26ff7987a6 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 27 Jan 2026 11:05:46 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba81ec9..7b234e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ All notable changes to this project will be documented in this file. - BREAKING: The operator no longer sets `opa.policy.column-masking-uri` in `access-control.properties` but `opa.policy.batch-column-masking-uri` instead, allowing Trino to fetch multiple column masks in a single request ([#827]). - Make `TrinoCatalog.spec.connector.iceberg.metastore` optional, as Iceberg also supports other catalogs, such as a REST catalog, - which (currently) can only be added using configOverrides ([#XXX]). + which (currently) can only be added using configOverrides ([#841]). ### Removed @@ -30,7 +30,7 @@ All notable changes to this project will be documented in this file. [#831]: https://github.com/stackabletech/trino-operator/pull/831 [#833]: https://github.com/stackabletech/trino-operator/pull/833 [#839]: https://github.com/stackabletech/trino-operator/pull/839 -[#XXX]: https://github.com/stackabletech/trino-operator/pull/XXX +[#841]: https://github.com/stackabletech/trino-operator/pull/841 ## [25.11.0] - 2025-11-07