Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.

### Added

- BREAKING: Add required CLI argument and env var to set the image repository used to construct final product image names: `IMAGE_REPOSITORY` (`--image-repository`), eg. `oci.example.org/my/namespace` ([#884]).
- Added support for the [PostgreSQL connector](https://trino.io/docs/current/connector/postgresql.html) using the new generic database connection mechanism.
Previously, users had to use the `generic` connector ([#883]).

Expand All @@ -32,6 +33,7 @@ All notable changes to this project will be documented in this file.
[#876]: https://github.com/stackabletech/trino-operator/pull/876
[#878]: https://github.com/stackabletech/trino-operator/pull/878
[#883]: https://github.com/stackabletech/trino-operator/pull/883
[#884]: https://github.com/stackabletech/trino-operator/pull/884

## [26.3.0] - 2026-03-16

Expand Down
29 changes: 15 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 20 additions & 14 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.110.0", features = ["webhook"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.111.0", features = ["webhook"] }

anyhow = "1.0"
async-trait = "0.1"
Expand Down
18 changes: 9 additions & 9 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions extra/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2195,8 +2195,9 @@ spec:
properties:
custom:
description: |-
Overwrite the docker image.
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
Provide a custom container image.

Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
type: string
productVersion:
description: Version of the product, e.g. `1.4.1`.
Expand All @@ -2223,14 +2224,20 @@ spec:
nullable: true
type: array
repo:
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
description: |-
The repository on the container image registry where the container image is located, e.g.
`oci.example.com/namespace`.

If not specified, the operator will use the image registry provided via the operator
environment options.
nullable: true
type: string
stackableVersion:
description: |-
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
If not specified, the operator will use its own version, e.g. `23.4.1`.
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.

If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
operator or a PR version, it will use the nightly `0.0.0-dev` image.
nullable: true
type: string
type: object
Expand Down
12 changes: 9 additions & 3 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use stackable_operator::{
volume::{SecretFormat, SecretOperatorVolumeSourceBuilder, VolumeBuilder},
},
},
cli::OperatorEnvironmentOptions,
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
commons::{
product_image_selection::{self, ResolvedProductImage},
Expand Down Expand Up @@ -110,6 +111,7 @@ use crate::{
pub struct Ctx {
pub client: stackable_operator::client::Client,
pub product_config: ProductConfigManager,
pub operator_environment: OperatorEnvironmentOptions,
}

pub const OPERATOR_NAME: &str = "trino.stackable.tech";
Expand All @@ -124,7 +126,7 @@ pub const MAX_PREPARE_LOG_FILE_SIZE: MemoryQuantity = MemoryQuantity {
unit: BinaryMultiple::Mebi,
};

const DOCKER_IMAGE_BASE_NAME: &str = "trino";
const CONTAINER_IMAGE_BASE_NAME: &str = "trino";

#[derive(Snafu, Debug, EnumDiscriminants)]
#[strum_discriminants(derive(IntoStaticStr))]
Expand Down Expand Up @@ -416,7 +418,11 @@ pub async fn reconcile_trino(
let resolved_product_image = trino
.spec
.image
.resolve(DOCKER_IMAGE_BASE_NAME, crate::built_info::PKG_VERSION)
.resolve(
CONTAINER_IMAGE_BASE_NAME,
&ctx.operator_environment.image_repository,
crate::built_info::PKG_VERSION,
)
.context(ResolveProductImageSnafu)?;

let resolved_authentication_classes =
Expand Down Expand Up @@ -1975,7 +1981,7 @@ mod tests {
let resolved_product_image = trino
.spec
.image
.resolve(DOCKER_IMAGE_BASE_NAME, "0.0.0-dev")
.resolve(CONTAINER_IMAGE_BASE_NAME, "oci.example.org", "0.0.0-dev")
.expect("test resolved product image is always valid");

let config_files = vec![
Expand Down
11 changes: 10 additions & 1 deletion rust/operator-binary/src/crd/catalog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,18 @@ pub enum TrinoCatalogConnector {

#[cfg(test)]
mod tests {
use crate::crd::catalog::{TrinoCatalog, TrinoCatalogVersion};
use stackable_operator::versioned::test_utils::RoundtripTestData;

use super::{TrinoCatalog, TrinoCatalogVersion, v1alpha1};

#[test]
fn test_crd_generation() {
TrinoCatalog::merged_crd(TrinoCatalogVersion::V1Alpha1).unwrap();
}

impl RoundtripTestData for v1alpha1::TrinoCatalogSpec {
fn roundtrip_test_data() -> Vec<Self> {
vec![]
}
}
}
8 changes: 8 additions & 0 deletions rust/operator-binary/src/crd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,8 @@ impl HasStatusCondition for v1alpha1::TrinoCluster {

#[cfg(test)]
mod tests {
use stackable_operator::versioned::test_utils::RoundtripTestData;

use super::*;

#[test]
Expand Down Expand Up @@ -1328,4 +1330,10 @@ mod tests {
Duration::from_minutes_unchecked(5)
);
}

impl RoundtripTestData for v1alpha1::TrinoClusterSpec {
fn roundtrip_test_data() -> Vec<Self> {
vec![]
Comment thread
sbernauer marked this conversation as resolved.
Outdated
}
}
}
Loading
Loading