|
1 | 1 | --- |
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 | | - envOverrides: |
33 | | - COMMON_VAR: role-value # overridden by role group below |
34 | | - ROLE_VAR: role-value # only defined here at role level |
35 | | - roleGroups: |
36 | | - default: |
37 | | - replicas: 1 |
38 | | - config: {} |
39 | | - envOverrides: |
40 | | - COMMON_VAR: group-value # overrides role value |
41 | | - GROUP_VAR: group-value # only defined here at group level |
42 | | - workers: |
43 | | - config: |
44 | | - gracefulShutdownTimeout: 5s # Let the test run faster |
45 | | - logging: |
46 | | - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
47 | | - envOverrides: |
48 | | - COMMON_VAR: role-value # overridden by role group below |
49 | | - ROLE_VAR: role-value # only defined here at role level |
50 | | - roleGroups: |
51 | | - default: |
52 | | - replicas: 1 |
53 | | - config: {} |
54 | | - envOverrides: |
55 | | - COMMON_VAR: group-value # overrides role value |
56 | | - GROUP_VAR: group-value # only defined here at group level |
57 | | ---- |
58 | 2 | apiVersion: authentication.stackable.tech/v1alpha1 |
59 | 3 | kind: AuthenticationClass |
60 | 4 | metadata: |
@@ -147,3 +91,61 @@ metadata: |
147 | 91 | stringData: |
148 | 92 | user: hive |
149 | 93 | password: hive |
| 94 | +--- |
| 95 | +# We need to create the TrinoCluster last, so that the ConfigMaps/Secrets it mounts are already |
| 96 | +# existing to prevent unnecessary Pod restarts. |
| 97 | +apiVersion: trino.stackable.tech/v1alpha1 |
| 98 | +kind: TrinoCluster |
| 99 | +metadata: |
| 100 | + name: trino |
| 101 | +spec: |
| 102 | + image: |
| 103 | +{% if test_scenario['values']['trino'].find(",") > 0 %} |
| 104 | + custom: "{{ test_scenario['values']['trino'].split(',')[1] }}" |
| 105 | + productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}" |
| 106 | +{% else %} |
| 107 | + productVersion: "{{ test_scenario['values']['trino'] }}" |
| 108 | +{% endif %} |
| 109 | + pullPolicy: IfNotPresent |
| 110 | + clusterConfig: |
| 111 | + catalogLabelSelector: |
| 112 | + matchLabels: |
| 113 | + trino: trino |
| 114 | + authentication: |
| 115 | + - authenticationClass: trino-users-auth |
| 116 | + authorization: |
| 117 | + opa: |
| 118 | + configMapName: opa |
| 119 | + package: trino |
| 120 | +{% if lookup('env', 'VECTOR_AGGREGATOR') %} |
| 121 | + vectorAggregatorConfigMapName: vector-aggregator-discovery |
| 122 | +{% endif %} |
| 123 | + coordinators: |
| 124 | + config: |
| 125 | + logging: |
| 126 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 127 | + envOverrides: |
| 128 | + COMMON_VAR: role-value # overridden by role group below |
| 129 | + ROLE_VAR: role-value # only defined here at role level |
| 130 | + roleGroups: |
| 131 | + default: |
| 132 | + replicas: 1 |
| 133 | + config: {} |
| 134 | + envOverrides: |
| 135 | + COMMON_VAR: group-value # overrides role value |
| 136 | + GROUP_VAR: group-value # only defined here at group level |
| 137 | + workers: |
| 138 | + config: |
| 139 | + gracefulShutdownTimeout: 5s # Let the test run faster |
| 140 | + logging: |
| 141 | + enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} |
| 142 | + envOverrides: |
| 143 | + COMMON_VAR: role-value # overridden by role group below |
| 144 | + ROLE_VAR: role-value # only defined here at role level |
| 145 | + roleGroups: |
| 146 | + default: |
| 147 | + replicas: 1 |
| 148 | + config: {} |
| 149 | + envOverrides: |
| 150 | + COMMON_VAR: group-value # overrides role value |
| 151 | + GROUP_VAR: group-value # only defined here at group level |
0 commit comments