Repository navigation
feat(helm): make gateway PVC size and StorageClass configurable - #3854
Conversation
6f0e9db to
59d0590
Compare
politerealism
left a comment
There was a problem hiding this comment.
Nice, this is a clean change and the README/.gotmpl stay in sync. Two small nits, neither blocking:
server.databaseStorageSizeis rendered as-is, so--set server.databaseStorageSize=20(no unit) parses as a number and rendersstorage: "20", which Kubernetes reads as 20 bytes. The docs already warn about this. Would aregexMatch+failin the template, or avalues.schema.jsonpattern, be worth it so it fails at render time?- The unit tests cover the default and the explicit-set cases. It might be worth adding a case for
workload.kind=deployment, since the README says both keys are ignored there, and one for a unitless size if you add validation.templates/gateway-config.yamlis listed in the suite'stemplates:but nothing uses it.
|
/ok to test 59d0590 |
|
Label |
PR Review StatusThe independent code review found no blocking findings. This focused Helm change implements accepted issue #3216, preserves the default gateway claim, and documents the new settings and StatefulSet/PVC migration constraints. Action required: A maintainer must use Re-run all jobs on Branch E2E Checks now that Blocking findings: None. Carried findings: None. Non-blocking suggestions: None. Gator metadata
|
purp
left a comment
There was a problem hiding this comment.
One nit that may be worth addressing: the PVC template name param openshell-data is more broadly named than the params databaseStorageSize and databaseStorageClass; might be good to make them dataStorage* instead.
Signed-off-by: Yuedong Wu <dwcn22@outlook.com>
59d0590 to
1bbcdb7
Compare
|
/ok to test 1bbcdb7 |
PR Review StatusThe independent follow-up review found no blocking findings. @purp, I checked your suggestion to match the I refreshed the test mirror with Action required: A maintainer must approve Trivy Changes so the required security scan can run. Maintainer approval of the PR is also required again after this update. Blocking findings: None. Carried findings: None. Gator metadata
|
Monitoring CompleteMonitoring is complete because this PR has merged. The final Gator state was merge-ready, with no blocking review findings and maintainer approval present. I removed the active Gator metadata
|
Summary
The chart hard-codes the gateway StatefulSet's claim to
1Giwith nostorageClassName, so operators need a post-render patch to size the gateway database or choose its storage tier. This addsserver.dataStorageSizeandserver.dataStorageClass; both default to empty, which keeps the current claim.Related Issue
Closes #3216
Changes
templates/statefulset.yaml: render the size (default1Gi) and, when set,storageClassNameinto the claim.templates/_helpers.tpl:openshell.validateValuesrejects a size without a unit, such as20, which Kubernetes reads as 20 bytes.values.yaml: both keys besidedbUrl; the class comment requires a block-backed class, not NFS, since SQLite runs in WAL mode (perf(server): enable WAL for the SQLite store; relax sync only for SSH session issuance #3543).tests/gateway_persistence_test.yaml: default and overridden rendering, and the unit-less rejection.Data PVC storagesection in the chart README, two rows and an immutability warning indocs/kubernetes/setup.mdx, and two rows inskills/debug-openshell-cluster/SKILL.md.gateway-config.mdxis unchanged because nothing renders intogateway.toml.Design notes
storageClassName, so the cluster default applies, matching the driver'sworkspace_storage_class. Static PV binding ("") stays unsupported, as before.volumeClaimTemplatesis immutable, so growing the claim is in-place PVC expansion and changing its class means copying data. The chart README documents both.gatewayConfig, so the keys sit underserverbesidedbUrlandexternalDbSecret, named after theopenshell-dataclaim they configure.Testing
mise run pre-commitpassesThree cases cover default rendering, overridden rendering, and the unit-less rejection. With unchanged values, the rendered StatefulSet is identical to
main's in the default render and every CI overlay, parsed as objects with annotations included, so upgrades leave the immutable claim template and the pods untouched.Checklist