Skip to content

Commit cca7877

Browse files
authored
fix: Deploy TrinoCatalogs before TrinoClusters (#383)
* 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 6c37036 commit cca7877

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
@@ -62,54 +112,6 @@ type: kubernetes.io/opaque
62112
stringData:
63113
admin: "{{ trinoAdminPassword }}"
64114
---
65-
apiVersion: trino.stackable.tech/v1alpha1
66-
kind: TrinoCatalog
67-
metadata:
68-
name: staging
69-
labels:
70-
trino: trino
71-
spec:
72-
connector:
73-
hive:
74-
metastore:
75-
configMap: hive
76-
s3:
77-
reference: minio
78-
---
79-
apiVersion: trino.stackable.tech/v1alpha1
80-
kind: TrinoCatalog
81-
metadata:
82-
name: lakehouse
83-
labels:
84-
trino: trino
85-
spec:
86-
connector:
87-
iceberg:
88-
metastore:
89-
configMap: hive-iceberg
90-
s3:
91-
reference: minio
92-
---
93-
apiVersion: trino.stackable.tech/v1alpha1
94-
kind: TrinoCatalog
95-
metadata:
96-
name: tpcds
97-
labels:
98-
trino: trino
99-
spec:
100-
connector:
101-
tpcds: {}
102-
---
103-
apiVersion: trino.stackable.tech/v1alpha1
104-
kind: TrinoCatalog
105-
metadata:
106-
name: tpch
107-
labels:
108-
trino: trino
109-
spec:
110-
connector:
111-
tpch: {}
112-
---
113115
apiVersion: opa.stackable.tech/v1alpha1
114116
kind: OpaCluster
115117
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
@@ -330,8 +330,10 @@ stacks:
330330
- helmChart: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/_templates/postgresql-superset.yaml
331331
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/spark-trino-superset-s3/s3-connection.yaml
332332
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/spark-trino-superset-s3/hive-metastore.yaml
333-
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/trino-superset-s3/trino.yaml
333+
# For now, on K8s 1.35, the TrinoCatalog needs to be deployed before the TrinoCluster
334+
# See: https://github.com/stackabletech/trino-operator/issues/854
334335
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/spark-trino-superset-s3/trino-prediction-catalog.yaml
336+
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/trino-superset-s3/trino.yaml
335337
- plainYaml: https://raw.githubusercontent.com/stackabletech/demos/main/stacks/trino-superset-s3/superset.yaml
336338
supportedNamespaces: []
337339
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
@@ -61,40 +97,6 @@ type: kubernetes.io/opaque
6197
stringData:
6298
admin: "{{ trinoAdminPassword }}"
6399
---
64-
apiVersion: trino.stackable.tech/v1alpha1
65-
kind: TrinoCatalog
66-
metadata:
67-
name: lakehouse
68-
labels:
69-
trino: trino
70-
spec:
71-
connector:
72-
iceberg:
73-
metastore:
74-
configMap: hive-iceberg
75-
s3:
76-
reference: minio
77-
---
78-
apiVersion: trino.stackable.tech/v1alpha1
79-
kind: TrinoCatalog
80-
metadata:
81-
name: tpcds
82-
labels:
83-
trino: trino
84-
spec:
85-
connector:
86-
tpcds: {}
87-
---
88-
apiVersion: trino.stackable.tech/v1alpha1
89-
kind: TrinoCatalog
90-
metadata:
91-
name: tpch
92-
labels:
93-
trino: trino
94-
spec:
95-
connector:
96-
tpch: {}
97-
---
98100
apiVersion: opa.stackable.tech/v1alpha1
99101
kind: OpaCluster
100102
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
@@ -53,20 +69,6 @@ type: kubernetes.io/opaque
5369
stringData:
5470
admin: "{{ trinoAdminPassword }}"
5571
---
56-
apiVersion: trino.stackable.tech/v1alpha1
57-
kind: TrinoCatalog
58-
metadata:
59-
name: hive
60-
labels:
61-
trino: trino
62-
spec:
63-
connector:
64-
hive:
65-
metastore:
66-
configMap: hive
67-
s3:
68-
reference: minio
69-
---
7072
apiVersion: opa.stackable.tech/v1alpha1
7173
kind: OpaCluster
7274
metadata:

0 commit comments

Comments
 (0)