Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Use emptyDir for segment cache #342

Closed
wants to merge 73 commits into from
Closed
Show file tree
Hide file tree
Changes from 71 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
2df5c34
wip adapted CRD
maltesander Oct 18, 2022
9c98a2a
adapted crds, added tls properties
maltesander Oct 18, 2022
1bb0ea0
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Oct 19, 2022
57d3783
adapted tests and examples
maltesander Oct 19, 2022
ade2d85
adapted docs to new structure
maltesander Oct 19, 2022
5fdf74d
wip - started tests
maltesander Oct 19, 2022
07bcdbe
code cleanup
maltesander Oct 19, 2022
9542070
more restructureing
maltesander Oct 20, 2022
3cce94a
wip
maltesander Oct 20, 2022
16ab4a4
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Oct 25, 2022
7ed6b6a
wip
maltesander Oct 25, 2022
967f8cc
wip
maltesander Oct 25, 2022
f514b5d
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Oct 26, 2022
fed8806
wip
maltesander Oct 26, 2022
a57ce39
removed internal tls for now. started tests.
maltesander Oct 28, 2022
3b706dc
tls tests working
maltesander Oct 30, 2022
4acc745
authentication working
maltesander Nov 2, 2022
e46da68
working on tests
maltesander Nov 2, 2022
3a59475
switched to clusterConfig
maltesander Nov 3, 2022
aab5ed5
wip
maltesander Nov 3, 2022
6665156
wip
maltesander Nov 4, 2022
6b35031
first tests passing after rework
maltesander Nov 4, 2022
2a022f4
adapted other tests to new crd structure
maltesander Nov 6, 2022
b5b3655
adapted docs
maltesander Nov 6, 2022
870b494
updated test definition
maltesander Nov 6, 2022
484c269
adapted changelog
maltesander Nov 6, 2022
7ffe15e
added example
maltesander Nov 7, 2022
2fb3181
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Nov 7, 2022
55989bb
first merging
maltesander Nov 7, 2022
b2a5a9a
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Nov 7, 2022
2c13892
local tests working - adapted probes
maltesander Nov 7, 2022
536f5f2
fix cargo tests
maltesander Nov 7, 2022
a43e566
clippy
maltesander Nov 7, 2022
8b83265
Apply suggestions from code review
maltesander Nov 7, 2022
980b268
yaml lints
maltesander Nov 7, 2022
195c99c
Merge remote-tracking branch 'origin/support_tls_authentication' into…
maltesander Nov 7, 2022
ed484f6
Removed copy paste trino reference
maltesander Nov 7, 2022
34af569
added authentication class permissions
maltesander Nov 7, 2022
a324954
Merge remote-tracking branch 'origin/main' into support_tls_authentic…
maltesander Nov 10, 2022
3efdb86
fix changelog
maltesander Nov 10, 2022
c148abd
fixed tls example with missing zk / hdfs cluster and znodes
maltesander Nov 10, 2022
33b99d2
removed role from common_compute_files
maltesander Nov 10, 2022
a1ff844
added unit tests for tls properties
maltesander Nov 10, 2022
d0ab6ab
tried to clarify that internal and external encryption / authenticati…
maltesander Nov 10, 2022
20ac94b
fix typo
maltesander Nov 10, 2022
08413cd
reusing CERTS_DIR constant instead of hardcoded directory
maltesander Nov 10, 2022
a4b243e
Upgrade to operator-rs 0.26.1
razvan Nov 11, 2022
759d403
Merge branch 'support_tls_authentication' into upgarde-operator-rs-26.1
razvan Nov 11, 2022
8e6bab3
Switched TLS tests to use s3 deep storage and TLS
maltesander Nov 11, 2022
16b5ef5
enable all tests
maltesander Nov 11, 2022
ae23584
Merge branch 'support_tls_authentication' into upgarde-operator-rs-26.1
razvan Nov 11, 2022
5ce660b
make regerenate-charts
razvan Nov 11, 2022
9e7f0c1
Update tests/templates/kuttl/tls/01-install-minio-certificates.yaml.j2
maltesander Nov 11, 2022
5a2a4c4
Update changelog and reenable more unit tests.
razvan Nov 11, 2022
458d7ac
Reenable more merge tests
razvan Nov 11, 2022
bd83dfd
Merge branch 'support_tls_authentication' into upgarde-operator-rs-26.1
razvan Nov 11, 2022
16e03e0
Report better mering error (use Snafu Box wrapping)
razvan Nov 14, 2022
b6589b8
merge main
razvan Nov 14, 2022
be7133e
Merge branch 'main' into 306-segment-cache-size
razvan Nov 14, 2022
03325a9
Added storage::FreePercentageEmptyDir
razvan Nov 14, 2022
3d84c49
Added tests for druid segment cache properties.
razvan Nov 14, 2022
e236b9d
Added volumes for segment cache
razvan Nov 14, 2022
901acf8
Replace "1g" with "1G" in defaults.
razvan Nov 14, 2022
c057858
Update docs with configuration of the `segmentCache` properties.
razvan Nov 15, 2022
df8ffbe
Update integration tests resources.
razvan Nov 15, 2022
d2d8afc
Added tests for the segment cache location property.
razvan Nov 15, 2022
0cadd07
Fix yaml lint warning.
razvan Nov 15, 2022
23bb0c1
Revert to serde_yaml 0.9 and update test.
razvan Nov 15, 2022
75cd7ee
Remove unnecessary unit test.
razvan Nov 16, 2022
c572bf9
make regenerate-charts
razvan Nov 16, 2022
d055c5b
Remov eunused error variant
razvan Nov 16, 2022
393b961
Update docs/modules/ROOT/pages/usage.adoc
razvan Nov 16, 2022
e132e20
Update rust/operator-binary/src/druid_controller.rs
razvan Nov 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.

- BREAKING: Support for TLS encryption (activated per default -> port changes) and TLS authentication ([#333]).
- BREAKING: Reworked top level configuration. Deep storage, Ingestion spec, discovery config maps etc. are now subfields of `spec.clusterConfig` instead of being top level under `spec` ([#333]).
- Use emptyDir for segment cache on historicals ([#342])

### Changed

Expand All @@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file.
[#333]: https://github.com/stackabletech/druid-operator/pull/333
[#339]: https://github.com/stackabletech/druid-operator/pull/339
[#340]: https://github.com/stackabletech/druid-operator/pull/340
[#342]: https://github.com/stackabletech/druid-operator/pull/342

## [0.8.0] - 2022-11-07

Expand Down
24 changes: 0 additions & 24 deletions deploy/config-spec/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -736,30 +736,6 @@ properties:
required: false
asOfVersion: "0.0.0"

- property: &segmentCacheLocations
propertyNames:
- name: "druid.segmentCache.locations"
kind:
type: "file"
file: "runtime.properties"
datatype:
type: "string"
defaultValues:
- fromVersion: "0.0.0"
value: "[{\"path\":\"/stackable/var/druid/segment-cache\",\"maxSize\":\"300g\"}]"
roles:
- name: "broker"
required: false
- name: "coordinator"
required: false
- name: "historical"
required: true
- name: "middleManager"
required: false
- name: "router"
required: false
asOfVersion: "0.0.0"

- property: &coordinatorAsOverlordOverlordService
propertyNames:
- name: "druid.coordinator.asOverlord.overlordService"
Expand Down
114 changes: 114 additions & 0 deletions deploy/crd/druidcluster.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,63 @@ spec:
type: object
type: object
storage:
properties:
segmentCache:
default:
freePercentage: 5
emptyDir:
capacity: 1G
medium: ''
properties:
emptyDir:
default:
capacity: null
properties:
capacity:
description: |-
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.

The serialization format is:

<quantity> ::= <signedNumber><suffix>
(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
<decimalSI> ::= m | "" | k | M | G | T | P | E
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>

No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.

When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.

Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
a. No precision is lost
b. No fractional digits will be emitted
c. The exponent (or suffix) is as large as possible.
The sign will be omitted unless the number is negative.

Examples:
1.5 will be serialized as "1500m"
1.5Gi will be serialized as "1536Mi"

Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.

Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)

This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
nullable: true
type: string
medium:
nullable: true
type: string
type: object
freePercentage:
format: uint16
minimum: 0.0
nullable: true
type: integer
type: object
type: object
type: object
type: object
Expand Down Expand Up @@ -1293,6 +1350,63 @@ spec:
type: object
type: object
storage:
properties:
segmentCache:
default:
freePercentage: 5
emptyDir:
capacity: 1G
medium: ''
properties:
emptyDir:
default:
capacity: null
properties:
capacity:
description: |-
Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.

The serialization format is:

<quantity> ::= <signedNumber><suffix>
(Note that <suffix> may be empty, from the "" case in <decimalSI>.)
<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
<decimalSI> ::= m | "" | k | M | G | T | P | E
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber>

No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.

When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.

Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
a. No precision is lost
b. No fractional digits will be emitted
c. The exponent (or suffix) is as large as possible.
The sign will be omitted unless the number is negative.

Examples:
1.5 will be serialized as "1500m"
1.5Gi will be serialized as "1536Mi"

Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.

Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)

This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
nullable: true
type: string
medium:
nullable: true
type: string
type: object
freePercentage:
format: uint16
minimum: 0.0
nullable: true
type: integer
type: object
type: object
type: object
type: object
Expand Down
24 changes: 0 additions & 24 deletions deploy/helm/druid-operator/configs/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -736,30 +736,6 @@ properties:
required: false
asOfVersion: "0.0.0"

- property: &segmentCacheLocations
propertyNames:
- name: "druid.segmentCache.locations"
kind:
type: "file"
file: "runtime.properties"
datatype:
type: "string"
defaultValues:
- fromVersion: "0.0.0"
value: "[{\"path\":\"/stackable/var/druid/segment-cache\",\"maxSize\":\"300g\"}]"
roles:
- name: "broker"
required: false
- name: "coordinator"
required: false
- name: "historical"
required: true
- name: "middleManager"
required: false
- name: "router"
required: false
asOfVersion: "0.0.0"

- property: &coordinatorAsOverlordOverlordService
propertyNames:
- name: "druid.coordinator.asOverlord.overlordService"
Expand Down
Loading