Skip to content

Commit 97d6a6e

Browse files
committed
Mutual TLS and S3 TLS verification (#244)
# Description - Now internal and client TLS can be configured instead of defaulting to "tls" secret class - S3 now supports proper TLS authentication closes #217 Co-authored-by: Malte Sander <malte.sander.it@gmail.com>
1 parent ee2446e commit 97d6a6e

34 files changed

+1861
-518
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ All notable changes to this project will be documented in this file.
99
- Include chart name when installing with a custom release name ([#233], [#234]).
1010
- `operator-rs` `0.21.1` -> `0.22.0` ([#235]).
1111
- Add support for Hive 3.1.3 ([#243])
12+
- Internal and client TLS now configurable instead of defaulting to "tls" secret class ([#244]).
13+
- S3 TLS properly supported ([#244]).
14+
- Introduced global `config` for `TLS` settings ([#244]).
1215

1316
[#233]: https://github.com/stackabletech/trino-operator/pull/233
1417
[#234]: https://github.com/stackabletech/trino-operator/pull/234
1518
[#235]: https://github.com/stackabletech/trino-operator/pull/235
1619
[#243]: https://github.com/stackabletech/trino-operator/pull/243
20+
[#244]: https://github.com/stackabletech/trino-operator/pull/244
1721

1822
## [0.4.0] - 2022-06-30
1923

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/config-spec/properties.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ properties:
8787
value: "8080"
8888
roles:
8989
- name: "coordinator"
90-
required: true
90+
required: false
9191
- name: "worker"
92-
required: true
92+
required: false
9393
asOfVersion: "0.0.0"
9494

9595
- property: &httpServerHttpsPort
@@ -108,6 +108,8 @@ properties:
108108
roles:
109109
- name: "coordinator"
110110
required: false
111+
- name: "worker"
112+
required: false
111113
asOfVersion: "0.0.0"
112114

113115
- property: &queryMaxMemory
@@ -217,7 +219,7 @@ properties:
217219
- "INFO"
218220
- "DEBUG"
219221
- "WARN"
220-
- "ERROR"
222+
- "ERROR"
221223
roles:
222224
- name: "coordinator"
223225
required: true

deploy/crd/trinocluster.crd.yaml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ spec:
2323
spec:
2424
properties:
2525
authentication:
26-
description: A reference to a secret containing username/password for defined users
2726
nullable: true
2827
properties:
2928
method:
@@ -50,7 +49,39 @@ spec:
5049
required:
5150
- method
5251
type: object
52+
config:
53+
default:
54+
tls:
55+
secretClass: tls
56+
internalTls:
57+
secretClass: tls
58+
description: Global Trino Config for cluster settings like TLS
59+
properties:
60+
internalTls:
61+
default:
62+
secretClass: tls
63+
description: "Only affects internal communication. Use mutual verification between Trino nodes This setting controls: - Which cert the servers should use to authenticate themselves against other servers - Which ca.crt to use when validating the other server"
64+
nullable: true
65+
properties:
66+
secretClass:
67+
type: string
68+
required:
69+
- secretClass
70+
type: object
71+
tls:
72+
default:
73+
secretClass: tls
74+
description: "Only affects client connections. This setting controls: - If TLS encryption is used at all - Which cert the servers should use to authenticate themselves against the client"
75+
nullable: true
76+
properties:
77+
secretClass:
78+
type: string
79+
required:
80+
- secretClass
81+
type: object
82+
type: object
5383
coordinators:
84+
description: Settings for the Coordinator Role/Process.
5485
nullable: true
5586
properties:
5687
cliOverrides:
@@ -158,9 +189,11 @@ spec:
158189
- roleGroups
159190
type: object
160191
hiveConfigMapName:
192+
description: The discovery ConfigMap name of the Hive cluster (usually the same as the Hive cluster name).
161193
nullable: true
162194
type: string
163195
opa:
196+
description: The discovery ConfigMap name of the OPA cluster (usually the same as the OPA cluster name).
164197
nullable: true
165198
properties:
166199
configMapName:
@@ -172,7 +205,7 @@ spec:
172205
- configMapName
173206
type: object
174207
s3:
175-
description: Operators are expected to define fields for this type in order to work with S3 connections.
208+
description: A reference to a S3 bucket.
176209
nullable: true
177210
oneOf:
178211
- required:
@@ -271,13 +304,15 @@ spec:
271304
type: string
272305
type: object
273306
stopped:
274-
description: "Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would)"
307+
description: "Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would)."
275308
nullable: true
276309
type: boolean
277310
version:
311+
description: "The provided trino image version in the form `xxx-stackableY.Y.Y` e.g. `387-stackable0.1.0`."
278312
nullable: true
279313
type: string
280314
workers:
315+
description: Settings for the Worker Role/Process.
281316
nullable: true
282317
properties:
283318
cliOverrides:

deploy/helm/trino-operator/configs/properties.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ properties:
8787
value: "8080"
8888
roles:
8989
- name: "coordinator"
90-
required: true
90+
required: false
9191
- name: "worker"
92-
required: true
92+
required: false
9393
asOfVersion: "0.0.0"
9494

9595
- property: &httpServerHttpsPort
@@ -108,6 +108,8 @@ properties:
108108
roles:
109109
- name: "coordinator"
110110
required: false
111+
- name: "worker"
112+
required: false
111113
asOfVersion: "0.0.0"
112114

113115
- property: &queryMaxMemory
@@ -217,7 +219,7 @@ properties:
217219
- "INFO"
218220
- "DEBUG"
219221
- "WARN"
220-
- "ERROR"
222+
- "ERROR"
221223
roles:
222224
- name: "coordinator"
223225
required: true

deploy/helm/trino-operator/crds/crds.yaml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ spec:
2424
spec:
2525
properties:
2626
authentication:
27-
description: A reference to a secret containing username/password for defined users
2827
nullable: true
2928
properties:
3029
method:
@@ -51,7 +50,39 @@ spec:
5150
required:
5251
- method
5352
type: object
53+
config:
54+
default:
55+
tls:
56+
secretClass: tls
57+
internalTls:
58+
secretClass: tls
59+
description: Global Trino Config for cluster settings like TLS
60+
properties:
61+
internalTls:
62+
default:
63+
secretClass: tls
64+
description: 'Only affects internal communication. Use mutual verification between Trino nodes This setting controls: - Which cert the servers should use to authenticate themselves against other servers - Which ca.crt to use when validating the other server'
65+
nullable: true
66+
properties:
67+
secretClass:
68+
type: string
69+
required:
70+
- secretClass
71+
type: object
72+
tls:
73+
default:
74+
secretClass: tls
75+
description: 'Only affects client connections. This setting controls: - If TLS encryption is used at all - Which cert the servers should use to authenticate themselves against the client'
76+
nullable: true
77+
properties:
78+
secretClass:
79+
type: string
80+
required:
81+
- secretClass
82+
type: object
83+
type: object
5484
coordinators:
85+
description: Settings for the Coordinator Role/Process.
5586
nullable: true
5687
properties:
5788
cliOverrides:
@@ -159,9 +190,11 @@ spec:
159190
- roleGroups
160191
type: object
161192
hiveConfigMapName:
193+
description: The discovery ConfigMap name of the Hive cluster (usually the same as the Hive cluster name).
162194
nullable: true
163195
type: string
164196
opa:
197+
description: The discovery ConfigMap name of the OPA cluster (usually the same as the OPA cluster name).
165198
nullable: true
166199
properties:
167200
configMapName:
@@ -173,7 +206,7 @@ spec:
173206
- configMapName
174207
type: object
175208
s3:
176-
description: Operators are expected to define fields for this type in order to work with S3 connections.
209+
description: A reference to a S3 bucket.
177210
nullable: true
178211
oneOf:
179212
- required:
@@ -272,13 +305,15 @@ spec:
272305
type: string
273306
type: object
274307
stopped:
275-
description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would)
308+
description: Emergency stop button, if `true` then all pods are stopped without affecting configuration (as setting `replicas` to `0` would).
276309
nullable: true
277310
type: boolean
278311
version:
312+
description: The provided trino image version in the form `xxx-stackableY.Y.Y` e.g. `387-stackable0.1.0`.
279313
nullable: true
280314
type: string
281315
workers:
316+
description: Settings for the Worker Role/Process.
282317
nullable: true
283318
properties:
284319
cliOverrides:

0 commit comments

Comments
 (0)