Skip to content

Commit 0eca298

Browse files
authored
fix(25.11): Deploy TrinoCatalogs before TrinoClusters (#382)
* fix(stack/spark-trino-superset-s3): Deploy TrinoCatalogs before TrinoCluster * fix(stack/data-lakehouse-iceberg-trino-spark): Deploy TrinoCatalogs before TrinoCluster * fix(stack/end-to-end-security): Deploy TrinoCatalogs before TrinoCluster * fix(stack/trino-iceberg): Deploy TrinoCatalogs before TrinoCluster * fix(stack/trino-superset-s3): Deploy TrinoCatalogs before TrinoCluster
1 parent 379b6f2 commit 0eca298

File tree

5 files changed

+157
-147
lines changed

5 files changed

+157
-147
lines changed

stacks/data-lakehouse-iceberg-trino-spark/trino.yaml

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
1+
# For now, on K8s 1.35, TrinoCatalogs need to be deployed before the TrinoCluster
2+
# See: https://github.com/stackabletech/trino-operator/issues/854
3+
---
4+
apiVersion: trino.stackable.tech/v1alpha1
5+
kind: TrinoCatalog
6+
metadata:
7+
name: staging
8+
labels:
9+
trino: trino
10+
spec:
11+
connector:
12+
hive:
13+
metastore:
14+
configMap: hive
15+
s3:
16+
reference: minio
17+
---
18+
apiVersion: trino.stackable.tech/v1alpha1
19+
kind: TrinoCatalog
20+
metadata:
21+
name: lakehouse
22+
labels:
23+
trino: trino
24+
spec:
25+
connector:
26+
iceberg:
27+
metastore:
28+
configMap: hive-iceberg
29+
s3:
30+
reference: minio
31+
---
32+
apiVersion: trino.stackable.tech/v1alpha1
33+
kind: TrinoCatalog
34+
metadata:
35+
name: tpcds
36+
labels:
37+
trino: trino
38+
spec:
39+
connector:
40+
tpcds: {}
41+
---
42+
apiVersion: trino.stackable.tech/v1alpha1
43+
kind: TrinoCatalog
44+
metadata:
45+
name: tpch
46+
labels:
47+
trino: trino
48+
spec:
49+
connector:
50+
tpch: {}
151
---
252
apiVersion: trino.stackable.tech/v1alpha1
353
kind: TrinoCluster
@@ -61,54 +111,6 @@ type: kubernetes.io/opaque
61111
stringData:
62112
admin: "{{ trinoAdminPassword }}"
63113
---
64-
apiVersion: trino.stackable.tech/v1alpha1
65-
kind: TrinoCatalog
66-
metadata:
67-
name: staging
68-
labels:
69-
trino: trino
70-
spec:
71-
connector:
72-
hive:
73-
metastore:
74-
configMap: hive
75-
s3:
76-
reference: minio
77-
---
78-
apiVersion: trino.stackable.tech/v1alpha1
79-
kind: TrinoCatalog
80-
metadata:
81-
name: lakehouse
82-
labels:
83-
trino: trino
84-
spec:
85-
connector:
86-
iceberg:
87-
metastore:
88-
configMap: hive-iceberg
89-
s3:
90-
reference: minio
91-
---
92-
apiVersion: trino.stackable.tech/v1alpha1
93-
kind: TrinoCatalog
94-
metadata:
95-
name: tpcds
96-
labels:
97-
trino: trino
98-
spec:
99-
connector:
100-
tpcds: {}
101-
---
102-
apiVersion: trino.stackable.tech/v1alpha1
103-
kind: TrinoCatalog
104-
metadata:
105-
name: tpch
106-
labels:
107-
trino: trino
108-
spec:
109-
connector:
110-
tpch: {}
111-
---
112114
apiVersion: opa.stackable.tech/v1alpha1
113115
kind: OpaCluster
114116
metadata:

stacks/end-to-end-security/trino.yaml

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
# For now, on K8s 1.35, TrinoCatalogs need to be deployed before the TrinoCluster
2+
# See: https://github.com/stackabletech/trino-operator/issues/854
3+
---
4+
apiVersion: trino.stackable.tech/v1alpha1
5+
kind: TrinoCatalog
6+
metadata:
7+
name: lakehouse
8+
labels:
9+
trino: trino
10+
spec:
11+
connector:
12+
iceberg:
13+
metastore:
14+
configMap: hive-iceberg
15+
hdfs:
16+
configMap: hdfs
17+
configOverrides:
18+
# HDFS configuration
19+
hive.hdfs.authentication.type: KERBEROS
20+
hive.hdfs.trino.principal: trino/trino.default.svc.cluster.local@KNAB.COM
21+
hive.hdfs.trino.keytab: /stackable/kerberos/keytab
22+
hive.hdfs.impersonation.enabled: "false"
23+
hive.hdfs.wire-encryption.enabled: "true"
24+
# HMS configuration
25+
hive.metastore.authentication.type: KERBEROS
26+
hive.metastore.client.principal: trino/trino.default.svc.cluster.local@KNAB.COM
27+
hive.metastore.client.keytab: /stackable/kerberos/keytab
28+
hive.metastore.service.principal: hive/hive-iceberg.default.svc.cluster.local@KNAB.COM
29+
hive.metastore.thrift.impersonation.enabled: "false"
30+
# By default, Hive views are executed with the RUN AS DEFINER security mode. Set the hive.hive-views.run-as-invoker catalog configuration property to true to use RUN AS INVOKER semantics.
31+
# However, this does *not* work for Iceberg catalogs :/ (I asked on the Trino slack: https://trinodb.slack.com/archives/CJ6UC075E/p1711449384648869)
32+
# hive.hive-views.run-as-invoker: "true"
33+
---
34+
apiVersion: trino.stackable.tech/v1alpha1
35+
kind: TrinoCatalog
36+
metadata:
37+
name: tpcds
38+
labels:
39+
trino: trino
40+
spec:
41+
connector:
42+
tpcds: {}
43+
---
44+
apiVersion: trino.stackable.tech/v1alpha1
45+
kind: TrinoCatalog
46+
metadata:
47+
name: tpch
48+
labels:
49+
trino: trino
50+
spec:
51+
connector:
52+
tpch: {}
153
---
254
apiVersion: trino.stackable.tech/v1alpha1
355
kind: TrinoCluster
@@ -67,56 +119,6 @@ spec:
67119
default:
68120
replicas: 1
69121
---
70-
apiVersion: trino.stackable.tech/v1alpha1
71-
kind: TrinoCatalog
72-
metadata:
73-
name: lakehouse
74-
labels:
75-
trino: trino
76-
spec:
77-
connector:
78-
iceberg:
79-
metastore:
80-
configMap: hive-iceberg
81-
hdfs:
82-
configMap: hdfs
83-
configOverrides:
84-
# HDFS configuration
85-
hive.hdfs.authentication.type: KERBEROS
86-
hive.hdfs.trino.principal: trino/trino.default.svc.cluster.local@KNAB.COM
87-
hive.hdfs.trino.keytab: /stackable/kerberos/keytab
88-
hive.hdfs.impersonation.enabled: "false"
89-
hive.hdfs.wire-encryption.enabled: "true"
90-
# HMS configuration
91-
hive.metastore.authentication.type: KERBEROS
92-
hive.metastore.client.principal: trino/trino.default.svc.cluster.local@KNAB.COM
93-
hive.metastore.client.keytab: /stackable/kerberos/keytab
94-
hive.metastore.service.principal: hive/hive-iceberg.default.svc.cluster.local@KNAB.COM
95-
hive.metastore.thrift.impersonation.enabled: "false"
96-
# By default, Hive views are executed with the RUN AS DEFINER security mode. Set the hive.hive-views.run-as-invoker catalog configuration property to true to use RUN AS INVOKER semantics.
97-
# However, this does *not* work for Iceberg catalogs :/ (I asked on the Trino slack: https://trinodb.slack.com/archives/CJ6UC075E/p1711449384648869)
98-
# hive.hive-views.run-as-invoker: "true"
99-
---
100-
apiVersion: trino.stackable.tech/v1alpha1
101-
kind: TrinoCatalog
102-
metadata:
103-
name: tpcds
104-
labels:
105-
trino: trino
106-
spec:
107-
connector:
108-
tpcds: {}
109-
---
110-
apiVersion: trino.stackable.tech/v1alpha1
111-
kind: TrinoCatalog
112-
metadata:
113-
name: tpch
114-
labels:
115-
trino: trino
116-
spec:
117-
connector:
118-
tpch: {}
119-
---
120122
apiVersion: v1
121123
kind: Secret
122124
metadata:

stacks/stacks-v2.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,10 @@ stacks:
311311
- helmChart: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/_templates/postgresql-superset.yaml
312312
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/spark-trino-superset-s3/s3-connection.yaml
313313
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/spark-trino-superset-s3/hive-metastore.yaml
314-
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/trino-superset-s3/trino.yaml
314+
# For now, on K8s 1.35, the TrinoCatalog needs to be deployed before the TrinoCluster
315+
# See: https://github.com/stackabletech/trino-operator/issues/854
315316
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/spark-trino-superset-s3/trino-prediction-catalog.yaml
317+
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/trino-superset-s3/trino.yaml
316318
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/release-25.11/stacks/trino-superset-s3/superset.yaml
317319
supportedNamespaces: []
318320
resourceRequests:

stacks/trino-iceberg/trino.yaml

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# For now, on K8s 1.35, TrinoCatalogs need to be deployed before the TrinoCluster
2+
# See: https://github.com/stackabletech/trino-operator/issues/854
3+
---
4+
apiVersion: trino.stackable.tech/v1alpha1
5+
kind: TrinoCatalog
6+
metadata:
7+
name: lakehouse
8+
labels:
9+
trino: trino
10+
spec:
11+
connector:
12+
iceberg:
13+
metastore:
14+
configMap: hive-iceberg
15+
s3:
16+
reference: minio
17+
---
18+
apiVersion: trino.stackable.tech/v1alpha1
19+
kind: TrinoCatalog
20+
metadata:
21+
name: tpcds
22+
labels:
23+
trino: trino
24+
spec:
25+
connector:
26+
tpcds: {}
27+
---
28+
apiVersion: trino.stackable.tech/v1alpha1
29+
kind: TrinoCatalog
30+
metadata:
31+
name: tpch
32+
labels:
33+
trino: trino
34+
spec:
35+
connector:
36+
tpch: {}
137
---
238
apiVersion: trino.stackable.tech/v1alpha1
339
kind: TrinoCluster
@@ -60,40 +96,6 @@ type: kubernetes.io/opaque
6096
stringData:
6197
admin: "{{ trinoAdminPassword }}"
6298
---
63-
apiVersion: trino.stackable.tech/v1alpha1
64-
kind: TrinoCatalog
65-
metadata:
66-
name: lakehouse
67-
labels:
68-
trino: trino
69-
spec:
70-
connector:
71-
iceberg:
72-
metastore:
73-
configMap: hive-iceberg
74-
s3:
75-
reference: minio
76-
---
77-
apiVersion: trino.stackable.tech/v1alpha1
78-
kind: TrinoCatalog
79-
metadata:
80-
name: tpcds
81-
labels:
82-
trino: trino
83-
spec:
84-
connector:
85-
tpcds: {}
86-
---
87-
apiVersion: trino.stackable.tech/v1alpha1
88-
kind: TrinoCatalog
89-
metadata:
90-
name: tpch
91-
labels:
92-
trino: trino
93-
spec:
94-
connector:
95-
tpch: {}
96-
---
9799
apiVersion: opa.stackable.tech/v1alpha1
98100
kind: OpaCluster
99101
metadata:

stacks/trino-superset-s3/trino.yaml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# For now, on K8s 1.35, TrinoCatalogs need to be deployed before the TrinoCluster
2+
# See: https://github.com/stackabletech/trino-operator/issues/854
3+
---
4+
apiVersion: trino.stackable.tech/v1alpha1
5+
kind: TrinoCatalog
6+
metadata:
7+
name: hive
8+
labels:
9+
trino: trino
10+
spec:
11+
connector:
12+
hive:
13+
metastore:
14+
configMap: hive
15+
s3:
16+
reference: minio
117
---
218
apiVersion: trino.stackable.tech/v1alpha1
319
kind: TrinoCluster
@@ -52,20 +68,6 @@ type: kubernetes.io/opaque
5268
stringData:
5369
admin: "{{ trinoAdminPassword }}"
5470
---
55-
apiVersion: trino.stackable.tech/v1alpha1
56-
kind: TrinoCatalog
57-
metadata:
58-
name: hive
59-
labels:
60-
trino: trino
61-
spec:
62-
connector:
63-
hive:
64-
metastore:
65-
configMap: hive
66-
s3:
67-
reference: minio
68-
---
6971
apiVersion: opa.stackable.tech/v1alpha1
7072
kind: OpaCluster
7173
metadata:

0 commit comments

Comments
 (0)