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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ All notable changes to this project will be documented in this file.

- Support objectOverrides using `.spec.objectOverrides`.
See [objectOverrides concepts page](https://docs.stackable.tech/home/nightly/concepts/overrides/#object-overrides) for details ([#831]).
- Enable the [restart-controller](https://docs.stackable.tech/home/nightly/commons-operator/restarter/), so that the Pods are automatically restarted on config changes ([#833]).

### Changed

- Pin k8s-openapi to `0.26.0` ([#831]).

[#831]: https://github.com/stackabletech/trino-operator/pull/831
[#833]: https://github.com/stackabletech/trino-operator/pull/833

## [25.11.0] - 2025-11-07

Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

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

30 changes: 15 additions & 15 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", features = ["telemetry", "versioned"], tag = "stackable-operator-0.101.2" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.102.0", features = ["telemetry", "versioned"] }

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

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

5 changes: 5 additions & 0 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ use stackable_operator::{
product_image_selection::{self, ResolvedProductImage},
rbac::build_rbac_resources,
},
constants::RESTART_CONTROLLER_ENABLED_LABEL,
k8s_openapi::{
DeepMerge,
api::{
Expand Down Expand Up @@ -662,6 +663,9 @@ pub async fn reconcile_trino(
rolegroup: role_group_ref.clone(),
})?;

// Note: The StatefulSet needs to be applied after all ConfigMaps and Secrets it mounts
// to prevent unnecessary Pod restarts.
// See https://github.com/stackabletech/commons-operator/issues/111 for details.
sts_cond_builder.add(
cluster_resources
.add(client, rg_stateful_set)
Expand Down Expand Up @@ -1387,6 +1391,7 @@ fn build_rolegroup_statefulset(
&role_group_ref.role_group,
))
.context(MetadataBuildSnafu)?
.with_label(RESTART_CONTROLLER_ENABLED_LABEL.to_owned())
.build(),
spec: Some(StatefulSetSpec {
pod_management_policy: Some("Parallel".to_string()),
Expand Down
2 changes: 2 additions & 0 deletions tests/templates/kuttl/smoke/10-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: trino-coordinator-default
generation: 1 # There should be no unneeded Pod restarts
spec:
template:
spec:
Expand All @@ -21,6 +22,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: trino-worker-default
generation: 1 # There should be no unneeded Pod restarts
spec:
template:
spec:
Expand Down
114 changes: 58 additions & 56 deletions tests/templates/kuttl/smoke/10-install-trino.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,60 +1,4 @@
---
apiVersion: trino.stackable.tech/v1alpha1
kind: TrinoCluster
metadata:
name: trino
spec:
image:
{% if test_scenario['values']['trino'].find(",") > 0 %}
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['trino'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
catalogLabelSelector:
matchLabels:
trino: trino
authentication:
- authenticationClass: trino-users-auth
authorization:
opa:
configMapName: opa
package: trino
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
coordinators:
config:
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
envOverrides:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
roleGroups:
default:
replicas: 1
config: {}
envOverrides:
COMMON_VAR: group-value # overrides role value
GROUP_VAR: group-value # only defined here at group level
workers:
config:
gracefulShutdownTimeout: 5s # Let the test run faster
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
envOverrides:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
roleGroups:
default:
replicas: 1
config: {}
envOverrides:
COMMON_VAR: group-value # overrides role value
GROUP_VAR: group-value # only defined here at group level
---
apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
Expand Down Expand Up @@ -147,3 +91,61 @@ metadata:
stringData:
user: hive
password: hive
---
# We need to create the TrinoCluster last, so that the ConfigMaps/Secrets it mounts are already
# existing to prevent unnecessary Pod restarts.
apiVersion: trino.stackable.tech/v1alpha1
kind: TrinoCluster
metadata:
name: trino
spec:
image:
{% if test_scenario['values']['trino'].find(",") > 0 %}
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
{% else %}
productVersion: "{{ test_scenario['values']['trino'] }}"
{% endif %}
pullPolicy: IfNotPresent
clusterConfig:
catalogLabelSelector:
matchLabels:
trino: trino
authentication:
- authenticationClass: trino-users-auth
authorization:
opa:
configMapName: opa
package: trino
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
vectorAggregatorConfigMapName: vector-aggregator-discovery
{% endif %}
coordinators:
config:
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
envOverrides:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
roleGroups:
default:
replicas: 1
config: {}
envOverrides:
COMMON_VAR: group-value # overrides role value
GROUP_VAR: group-value # only defined here at group level
workers:
config:
gracefulShutdownTimeout: 5s # Let the test run faster
logging:
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
envOverrides:
COMMON_VAR: role-value # overridden by role group below
ROLE_VAR: role-value # only defined here at role level
roleGroups:
default:
replicas: 1
config: {}
envOverrides:
COMMON_VAR: group-value # overrides role value
GROUP_VAR: group-value # only defined here at group level