-
Notifications
You must be signed in to change notification settings - Fork 102
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
feat: allow passing mkfs format options via storage class parameters #747
feat: allow passing mkfs format options via storage class parameters #747
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #747 +/- ##
==========================================
- Coverage 35.96% 35.89% -0.08%
==========================================
Files 19 19
Lines 1835 1850 +15
==========================================
+ Hits 660 664 +4
- Misses 1142 1153 +11
Partials 33 33 ☔ View full report in Codecov by Sentry. |
94cd9cc
to
f258593
Compare
f457046
to
0215469
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am really unsure what the best way of configuring the xfs settings is.
I wrote a bunch of ideas, let me know what you think. I'd wait for Julian's input before merging this anyways :)
2d2c235
to
0e7173e
Compare
6b9e25c
to
f34cea5
Compare
dd1aecb
to
3a5232e
Compare
2e66ebe
to
3b87d16
Compare
0206921
to
1bfaff4
Compare
If all nodes in your cluster run the same kernel version, the CSI driver will automatically determine the correct `mkfs.xfs` options. However, if your cluster has nodes with different kernel versions, older nodes may fail to mount volumes created by newer kernels. To avoid this issue, you can set a minimum kernel version via `xfsMinSupportedKernel`. This ensures that all nodes use the appropriate `mkfs.xfs` defaults for maximum compatibility. The following strings are valid versions, but only the major, minor, and patch components are considered. If a major, minor, or patch version is not provided, it is evaluated as `0`.
After switching to the mount-utils library from k8s the xfs format options and fallback method have to be reimplemented.
Co-authored-by: Jonas L. <[email protected]>
Co-authored-by: Jonas L. <[email protected]>
Co-authored-by: Julian Tölle <[email protected]>
30cf739
to
216294a
Compare
🤖 I have created a release *beep* *boop* --- ## [2.10.0](v2.9.0...v2.10.0) (2024-10-29) ### Features * add support & tests for Kubernetes 1.31 ([#721](#721)) ([85035b9](85035b9)) * allow arbitrary length API tokens ([#724](#724)) ([61c3a0e](61c3a0e)) * allow passing mkfs format options via storage class parameters ([#747](#747)) ([4b9aa4e](4b9aa4e)) * change XFS default options to support older kernels ([#747](#747)) ([4b9aa4e](4b9aa4e)) * drop tests for Kubernetes 1.27 ([#722](#722)) ([d46a54b](d46a54b)) * force pods with volumes to be scheduled on Cloud servers ([#743](#743)) ([702fe01](702fe01)) * fstype is directly passed to mkfs: mkfs.<fstype> ([#749](#749)) ([173bf2f](173bf2f)) * support for SELinux mount ([#756](#756)) ([719247e](719247e)), closes [#582](#582) * Support SINGLE_NODE_MULTI_WRITER capability ([#725](#725)) ([cd53c23](cd53c23)), closes [#327](#327) * **swarm:** removed workaround support for mock staging/unstaging ([#746](#746)) ([465ec21](465ec21)) ### Bug Fixes * do not log sensitive mount options ([#755](#755)) ([0b6e860](0b6e860)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [2.10.0](v2.9.0...v2.10.0) (2024-10-29) ### Features * add support & tests for Kubernetes 1.31 ([#721](#721)) ([85035b9](85035b9)) * allow arbitrary length API tokens ([#724](#724)) ([61c3a0e](61c3a0e)) * allow passing mkfs format options via storage class parameters ([#747](#747)) ([4b9aa4e](4b9aa4e)) * change XFS default options to support older kernels ([#747](#747)) ([4b9aa4e](4b9aa4e)) * drop tests for Kubernetes 1.27 ([#722](#722)) ([d46a54b](d46a54b)) * force pods with volumes to be scheduled on Cloud servers ([#743](#743)) ([702fe01](702fe01)) * fstype is directly passed to mkfs: mkfs.<fstype> ([#749](#749)) ([173bf2f](173bf2f)) * support for SELinux mount ([#756](#756)) ([719247e](719247e)), closes [#582](#582) * Support SINGLE_NODE_MULTI_WRITER capability ([#725](#725)) ([cd53c23](cd53c23)), closes [#327](#327) * **swarm:** removed workaround support for mock staging/unstaging ([#746](#746)) ([465ec21](465ec21)) ### Bug Fixes * do not log sensitive mount options ([#755](#755)) ([0b6e860](0b6e860)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
User can now pass format options directly to mkfs via storage class parameters for every fstype.
Older kernels might not be compatible with the mkfs.xfs options we set. As mkfs.xfs provides a default set of options for certain linux kernel lts versions we can choose the appropriate set of values by inspecting the current kernel version.
If we can find a suitable config we fall back to the most compatible version with older kernels.
BEGIN_COMMIT_OVERRIDE
feat: allow passing mkfs format options via storage class parameters (#747)
feat: change XFS default options to support older kernels (#747)
END_COMMIT_OVERRIDE