feat: allow passing mkfs format options via storage class parameters#747
Merged
lukasmetzner merged 25 commits intomainfrom Oct 25, 2024
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
jooola
reviewed
Oct 10, 2024
f457046 to
0215469
Compare
jooola
reviewed
Oct 14, 2024
Member
jooola
left a comment
There was a problem hiding this comment.
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
jooola
reviewed
Oct 22, 2024
dd1aecb to
3a5232e
Compare
jooola
reviewed
Oct 22, 2024
jooola
reviewed
Oct 22, 2024
2e66ebe to
3b87d16
Compare
jooola
reviewed
Oct 22, 2024
jooola
reviewed
Oct 22, 2024
jooola
reviewed
Oct 22, 2024
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. <jooola@users.noreply.github.com>
Co-authored-by: Jonas L. <jooola@users.noreply.github.com>
Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
30cf739 to
216294a
Compare
apricote
approved these changes
Oct 25, 2024
lukasmetzner
pushed a commit
that referenced
this pull request
Oct 29, 2024
🤖 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).
lukasmetzner
pushed a commit
that referenced
this pull request
Nov 11, 2024
🤖 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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