Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([#841]).

### Removed

Expand All @@ -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
[#841]: https://github.com/stackabletech/trino-operator/pull/841

## [25.11.0] - 2025-11-07

Expand Down
9 changes: 6 additions & 3 deletions deploy/helm/trino-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
20 changes: 11 additions & 9 deletions rust/operator-binary/src/catalog/iceberg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
5 changes: 4 additions & 1 deletion rust/operator-binary/src/crd/affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
7 changes: 5 additions & 2 deletions rust/operator-binary/src/crd/catalog/iceberg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<MetastoreConnection>,

/// Connection to an S3 store.
/// Please make sure that the underlying Hive metastore also has access to the S3 store.
Expand Down