-
Notifications
You must be signed in to change notification settings - Fork 457
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
Change PV and PVC status capacity on resize #350
Conversation
90bb109
to
3326727
Compare
How about adding possibility to invoke helper pod when this happens? eg to change XFS quota when this happens? |
@marjus45 Can you check @laurivosandi's comment? Thank you. |
Any update on this? |
Hi @laurivosandi , and sorry for the (very) late reply. I am happy proceed with this and to help but I am not that familiar with the XFS quota setup. If you, or @derekbit could give me some pointers on how I could test that it would be great. I see that there is an example in |
3326727
to
c0c1c13
Compare
Hi @derekbit and @laurivosandi , I have added the invocation of the helper pod, with a new "resize" script and action. I have not updated any related example for the XFS quota since I do not have such setup to test, but that shouldn't block this PR. |
Hey @derekbit I think something is off with the CI. It says "build was killed" but there is no error as far as I can understand. Also it has a message about an expired license which might be relevant. |
This is a very nice feature, any chance this PR gets a little bit of attention? |
Is this still in development? |
@fs185143 This is waiting feedback from the maintainers |
Tested this PR last week and it works fine in a local setup (thanks @marjus45 !). Can we expect this to be reviewed and merged soon? Thanks! |
Sure. This is in the scope of the upcoming release (before the end of May). |
@@ -39,6 +39,9 @@ rules: | |||
- apiGroups: ["storage.k8s.io"] | |||
resources: ["storageclasses"] | |||
verbs: ["get", "list", "watch"] | |||
- apiGroups: [ "" ] |
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.
@marjus45 shouldn't we do these changes (to the ClusterRole and to the ConfigMap) to the corresponding resources as well in the chart under deploy/chart/local-path-provisioner
?
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.
Ah, you are right, I had missed that. I updated and tested the helm installation as well.
@@ -9,13 +9,16 @@ import ( | |||
"syscall" | |||
|
|||
"github.com/Sirupsen/logrus" | |||
resizeController "github.com/kubernetes-csi/external-resizer/pkg/controller" |
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 don't have much context but I can share that the external-resizer runs as a sidecar next to a CSI driver. It is one of the many CSI sidecars - external-provisioner, external-attacher, csi-driver-node-registrar and liveness-probe. Isn't possible to run the external-resizer as a sidecar container?
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.
You are right @ialidzhikov, the resizer would fit better as a separate container. Such change though would require a change in the directory structure. I can draft a solution as such, but I would like a comment also from the maintainers if they are okay with such a change. What do you think @derekbit ?
Great, I hope this version can support the capacity limit and volume expansion of pvc |
We add the interface for volume expansion. This will not have any effect on the underlying volume, but will change properly the PV capacity and PVC status when a claim is made, and the proper events will be produced as well. To do that the external-resizer is used provided by Kubernetes for this purpose. Signed-off-by: Marjus Cako <[email protected]>
Update the resize function to invoke the helper Pod with the "resize" script. This also adds some dummy resize scripts, which store the resize data in a file in the PV. It does not add though any sample script for the XFS quota resize. Signed-off-by: Marjus Cako <[email protected]>
c0c1c13
to
238474c
Compare
docker pull nicktming/storage-xfs-quota:v0.1 |
Should the storage class not have volume expansion set to true? |
In the latest version v0.0.27, is pvc changesize supported? |
Not yet. I put it into v0.0.28 instead. I hope v0.0.28 can be released in Aug. |
eagerly waiting for this to be included :) |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR was closed because it has been stalled for 10 days with no activity. |
This would be very helpful for users trying to test volume expansion when using KinD (which uses this provisioner by default). Is this PR still being considered for inclusion in the next release? |
Is pvc changesize supported in 0.0.30? Thanks. @derekbit |
We add the proper interface for volume expansion. This will not have any effect on the underlying volume, but it will change properly the PV capacity, the PVC status, and the proper events when a claim is made.
To do this I used the external-resizer provided by Kubernetes for this purpose. This requires a Golang version upgrade to 1.20.
This relates to #190 and is a follow up to #189 which allowed volume expansion on the storage class level.
As it is now, when a claim is made the provisioner does nothing, and the PV capacity, as well as the PVC status, remain unchanged. This enhances the consistency, and will further assist if we end up adding quotas as described in #190.