Skip to content

Commit 345edad

Browse files
razvansbernauer
andauthored
test: Fix tests on k8s 1.35 by applying the TrinoCatalog after the TrinoCluster (#857)
* fix: pod spec doesn't match sts spec * update changelog * Update tests/templates/kuttl/opa-authorization/20-install-trino.yaml.j2 Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de> --------- Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.de>
1 parent d81b6f8 commit 345edad

2 files changed

Lines changed: 49 additions & 44 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ All notable changes to this project will be documented in this file.
2525
- Make `TrinoCatalog.spec.connector.iceberg.metastore` optional, as Iceberg also supports other catalogs, such as a REST catalog,
2626
which (currently) can only be added using configOverrides ([#841]).
2727

28+
### Fixed
29+
30+
- Kuttl tests where catalogs are created after the Trino cluster. These tests failed on Kubernetes 1.35 because the Trino pods were missing catalog information ([#857]).
31+
2832
### Removed
2933

3034
- Remove support for Trino 451 and 476 ([#839]).
@@ -37,6 +41,7 @@ All notable changes to this project will be documented in this file.
3741
[#843]: https://github.com/stackabletech/trino-operator/pull/843
3842
[#848]: https://github.com/stackabletech/trino-operator/pull/848
3943
[#855]: https://github.com/stackabletech/trino-operator/pull/855
44+
[#857]: https://github.com/stackabletech/trino-operator/pull/857
4045

4146
## [25.11.0] - 2025-11-07
4247

tests/templates/kuttl/opa-authorization/20-install-trino.yaml.j2

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,4 @@
11
---
2-
apiVersion: trino.stackable.tech/v1alpha1
3-
kind: TrinoCluster
4-
metadata:
5-
name: trino
6-
spec:
7-
image:
8-
{% if test_scenario['values']['trino'].find(",") > 0 %}
9-
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
10-
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
11-
{% else %}
12-
productVersion: "{{ test_scenario['values']['trino'] }}"
13-
{% endif %}
14-
pullPolicy: IfNotPresent
15-
clusterConfig:
16-
catalogLabelSelector:
17-
matchLabels:
18-
trino: trino
19-
authentication:
20-
- authenticationClass: trino-users-auth
21-
authorization:
22-
opa:
23-
configMapName: opa
24-
package: trino
25-
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
26-
vectorAggregatorConfigMapName: vector-aggregator-discovery
27-
{% endif %}
28-
coordinators:
29-
config:
30-
logging:
31-
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
32-
roleGroups:
33-
default:
34-
replicas: 1
35-
config: {}
36-
workers:
37-
config:
38-
gracefulShutdownTimeout: 10s # Let the test run faster
39-
logging:
40-
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
41-
roleGroups:
42-
default:
43-
replicas: 1
44-
config: {}
45-
---
462
apiVersion: authentication.stackable.tech/v1alpha1
473
kind: AuthenticationClass
484
metadata:
@@ -108,3 +64,47 @@ spec:
10864
configMap: hive # It's fine to reuse the existing HMS for tests. Not recommended for production though, there a dedicated HMS should be used.
10965
s3:
11066
reference: minio
67+
---
68+
apiVersion: trino.stackable.tech/v1alpha1
69+
kind: TrinoCluster
70+
metadata:
71+
name: trino
72+
spec:
73+
image:
74+
{% if test_scenario['values']['trino'].find(",") > 0 %}
75+
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
76+
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
77+
{% else %}
78+
productVersion: "{{ test_scenario['values']['trino'] }}"
79+
{% endif %}
80+
pullPolicy: IfNotPresent
81+
clusterConfig:
82+
catalogLabelSelector:
83+
matchLabels:
84+
trino: trino
85+
authentication:
86+
- authenticationClass: trino-users-auth
87+
authorization:
88+
opa:
89+
configMapName: opa
90+
package: trino
91+
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
92+
vectorAggregatorConfigMapName: vector-aggregator-discovery
93+
{% endif %}
94+
coordinators:
95+
config:
96+
logging:
97+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
98+
roleGroups:
99+
default:
100+
replicas: 1
101+
config: {}
102+
workers:
103+
config:
104+
gracefulShutdownTimeout: 10s # Let the test run faster
105+
logging:
106+
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
107+
roleGroups:
108+
default:
109+
replicas: 1
110+
config: {}

0 commit comments

Comments
 (0)