-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Support "fstype" parameter in dynamically provisioned PVs #45345
Support "fstype" parameter in dynamically provisioned PVs #45345
Conversation
Hi @codablock. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@k8s-bot ok to test |
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.
@@ -107,6 +107,7 @@ var _ volume.Provisioner = &azureDiskProvisioner{} | |||
|
|||
func (a *azureDiskProvisioner) Provision() (*v1.PersistentVolume, error) { | |||
var sku, location, account string | |||
var FSType *string |
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.
Shouldn't it be "ext4" by default so it's consistent among all volume plugins?
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.
If I remember correct, Azure already does the default fstype handling later and I did not want to touch that part. Azure was well tested by me at that time and it worked well.
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.
Just pushed an update to the examples.
5faf0d5
to
2b1a373
Compare
``` | ||
|
||
* `type`: `io1`, `gp2`, `sc1`, `st1`. See AWS docs for details. Default: `gp2`. | ||
* `zone`: AWS zone. If not specified, a random zone from those where Kubernetes cluster has a node is chosen. | ||
* `iopsPerGB`: only for `io1` volumes. I/O operations per second per GiB. AWS volume plugin multiplies this with size of requested volume to compute IOPS of the volume and caps it at 20 000 IOPS (maximum supported by AWS, see AWS docs). | ||
* `encrypted`: denotes whether the EBS volume should be encrypted or not. Valid values are `true` or `false`. | ||
* `kmsKeyId`: optional. The full Amazon Resource Name of the key to use when encrypting the volume. If none is supplied but `encrypted` is true, a key is generated by AWS. See AWS docs for valid ARN value. | ||
* `fstype`: fstype that are supported by kubernetes. Default: `"ext4"`. |
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.
fstype -> fsType?
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 copied this line 1:1 from vSphere where fstype was already supported. If I change it to fsType, I'll change it there as well. What do you think?
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.
It's a typo, please change it to fsType
. Thanks!
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.
Changed.
@codeblock LGTM. Please rebase. |
2b1a373
to
fa98965
Compare
Anything I can do to help move this along? |
fa98965
to
f8886ce
Compare
@k8s-bot gce etcd3 e2e test this |
I'm blocked by this as well |
f8886ce
to
7a23bcc
Compare
Can anyone help with the test failures please? They look completely unrelated but keep failing all the time and I really don't know what to look for. |
Some statefulset tests rely on dynamic provisioning, they are definitely related. Dug through controller manager logs for you: I0524 08:25:06.367294 5 pv_controller.go:1336] failed to provision volume for claim "e2e-tests-statefulset-71bln/datadir-ss-0" with StorageClass "standard": invalid option "type" for volume plugin kubernetes.io/gce-pd |
pkg/volume/aws_ebs/aws_ebs.go
Outdated
case volume.VolumeParameterFSType: | ||
FSType = v | ||
default: | ||
return nil, fmt.Errorf("invalid option %q for volume plugin %s", k, c.plugin.GetPluginName()) |
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.
There is existing parameters (type, zone) parsing in gce_util.go; this is why the tests are failing
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.
same for aws, cinder, photon, and vsphere, they all have _util.go files where the new parameter should be added
CC @kubernetes/sig-storage-pr-reviews @gnufied @thockin @wattsteve @childsb Erin, brought this PR up as related to our discussion about FSs this morning. FWIW, this aligns with the direction I was thinking. FSType is codified as a parameter in the provisioner. Once @jsafrane's "user selectable storage class options" is complete, cluster admins would also be able to filter FS types, it if they want, along with other StorageClass parameters. As implemented it sets the FSType in on the PV object which is then used during mounting--the nice thing about that is it works seamlessly with pre-provisioned volumes. |
I agree with the sentiment that parameters in the storage class should always be treated as opaque. As a result, we shouldn't promote any keywords in the parameters section of the storage class. I also think I'm of the opinion that it's perfectly ok for a volume plugin to make use of |
Any chance to get a final approval here? The merge robot suggests @smarterclayton for approval. As more time passes, as harder it gets for me to participate in discussions as I'm not actively working on k8s anymore. I'll do a final rebase when final approval is done if that's ok with everyone, as this PR already required quite a lot of rebases in the past as code seems to move fast in the touched places. |
Unfortunately, examples/OWNERS has very little approvers. I scheduled an item on the next sig-storage meeting to formally approve these API changes next Thursday, after that it could be merged, the code is solid. |
f94c9b8
to
8057056
Compare
Did another rebase to prepare for the formal approval. Also, I had to create another PR in kubernetes/examples: kubernetes/examples#28 as the README.md for the examples has moved to this repo. |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: codablock, jsafrane Associated issue: 37801 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Thanks for the PR and your patience! |
/retest |
1 similar comment
/retest |
come on... |
Are these failures unrelated flakes? Or should I take a deeper look? |
they're flakes |
/retest |
@codablock: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486) |
@codablock @jsafrane Woohoo! Thank you for your persistence here. |
Automatic merge from submit-queue (batch tested with PRs 45345, 49470, 49407, 49448, 49486) Support "fstype" parameter in dynamically provisioned PVs This PR is a replacement for kubernetes#40805. I was not able to push fixes and rebases to the original branch as I don't have access to the Github organization anymore. I assume the PR will need a new "ok to test" **ORIGINAL PR DESCRIPTION** **What this PR does / why we need it**: This PR allows specifying the desired FSType when dynamically provisioning volumes with storage classes. The FSType can now be set as a parameter: ```yaml kind: StorageClass apiVersion: storage.k8s.io/v1beta1 metadata: name: test provisioner: kubernetes.io/azure-disk parameters: fstype: xfs ``` **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes#37801 **Special notes for your reviewer**: The PR also implicitly adds checks for unsupported parameters. **Release note**: ```release-note Support specifying of FSType in StorageClass ```
This PR is a replacement for #40805. I was not able to push fixes and rebases to the original branch as I don't have access to the Github organization anymore.
I assume the PR will need a new "ok to test"
ORIGINAL PR DESCRIPTION
What this PR does / why we need it: This PR allows specifying the desired FSType when dynamically provisioning volumes with storage classes. The FSType can now be set as a parameter:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #37801Special notes for your reviewer:
The PR also implicitly adds checks for unsupported parameters.
Release note: