fix(garage): compressionLevel disables with "none", never with 0
Validate Helm Charts / Detect changed charts (pull_request) Successful in 3s
Validate Helm Charts / Resource quantities (pull_request) Successful in 12s
Validate Helm Charts / Build garage (pull_request) Successful in 7s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 16s
Install-test / Install-test garage (pull_request) Successful in 1m17s
Validate Helm Charts / Install-test (pull_request) Successful in 1m17s
Validate Helm Charts / Detect changed charts (pull_request) Successful in 3s
Validate Helm Charts / Resource quantities (pull_request) Successful in 12s
Validate Helm Charts / Build garage (pull_request) Successful in 7s
Validate Helm Charts / Trivy config garage (pull_request) Successful in 16s
Install-test / Install-test garage (pull_request) Successful in 1m17s
Validate Helm Charts / Install-test (pull_request) Successful in 1m17s
My own values comment claimed 0 switches compression off. It does not: Garage's deserializer takes an integer OR the literal string "none" (src/util/config.rs, deserialize_compression), and 0 is a valid integer that zstd reads as its default level - 3, i.e. MORE compression than the chart's 1, not none. A comment that invites an operator to write 0 for "off" is the values-that-must-not-lie shape with the lie in the documentation instead of in the template. The schema now accepts an integer (negative included, those are zstd's fast modes) or exactly "none", and the ConfigMap quotes the string form so the rendered TOML stays valid. Verified: 1, 7, -3 render unquoted, "none" renders quoted and the result still parses as TOML, and any other string is rejected by the schema. No version bump: the chart is not published yet.
This commit is contained in:
3 files changed
+23
-4
No files matched your search
+9
-1
@@ -212,7 +212,15 @@ garage:
|
||||
# Garage's defaults, exposed because they are the two knobs that trade disk
|
||||
# against CPU. blockSize is the chunk size objects are split into;
|
||||
# compressionLevel is the zstd level for stored blocks (1 = fast, higher =
|
||||
# smaller, "none" is not a value here - set 0 to disable).
|
||||
# smaller, negative levels are zstd's "fast" modes).
|
||||
#
|
||||
# TO DISABLE COMPRESSION, WRITE THE STRING "none" - and not 0, which is the
|
||||
# trap this comment exists for: Garage's deserializer accepts an integer or
|
||||
# the literal "none" (src/util/config.rs, deserialize_compression), and 0 is
|
||||
# a perfectly valid integer that zstd reads as "use my default level", i.e.
|
||||
# level 3 - MORE compression than the 1 below, not less. The schema therefore
|
||||
# accepts an integer or exactly "none", and the ConfigMap quotes the string
|
||||
# form so the rendered TOML stays valid.
|
||||
blockSize: "1M"
|
||||
compressionLevel: 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user