fix: use pv annotation to trigger filesystem resize when necessary#140
fix: use pv annotation to trigger filesystem resize when necessary#140k8s-ci-robot merged 4 commits intokubernetes-csi:masterfrom
Conversation
|
Welcome @sunpa93! |
|
Hi @sunpa93. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
/assign |
024a4c3 to
ea04a85
Compare
gnufied
left a comment
There was a problem hiding this comment.
Looks good mostly. But I think we need unit tests for some these new behaviours.
ea04a85 to
0a14f02
Compare
I have modified the tests so that they check if annotations get properly populated and deleted |
|
/lgtm |
|
/assign @msau42 |
| } | ||
|
|
||
| if ctrl.isNodeExpandComplete(pvc, pv) && metav1.HasAnnotation(pv.ObjectMeta, util.AnnPreResizeCapacity) { | ||
| if err := ctrl.deletePreResizeCapAnnotation(pv); err != nil { |
There was a problem hiding this comment.
how come resize controller is deleting the annotation? Shouldn't kubelet do it after nodeexpand is complete?
There was a problem hiding this comment.
This is because kubelet does not have the permission to modify PV objects.
There was a problem hiding this comment.
@gnufied is this an issue? Does this mean plugins that don't support controller resize and don't run the resizer will get this fix?
There was a problem hiding this comment.
Currently I think external-resizer is required even for plugins that don't support controller expansion, because in that case external-resizer calls a NO-OP control-plane expansion and successfully expands the PV. There is no way to update PV spec from kubelet otherwise. So every plugin that supports expansion needs to run resizer.
bc0504a Merge pull request kubernetes-csi#140 from jsafrane/remove-unused-k8s-libs 5b1de1a go-get-kubernetes.sh: remove unused k8s libs 49b4269 Merge pull request kubernetes-csi#120 from pohly/add-kubernetes-release f7e7ee4 docs: steps for adding testing against new Kubernetes release git-subtree-dir: release-tools git-subtree-split: bc0504ad76ac6e20d0d7c60d46f62c7ff7591f8c
necessary. delete when pvc.status.capacity >= pv.spec.capacity
|
Any updates on this? We are pending on csi-resizer release |
|
Can you squash 4 last commits in one? |
Done :) |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, sunpa93 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…ncy-openshift-4.14-ose-csi-external-resizer Updating ose-csi-external-resizer images to be consistent with ART
What type of PR is this?
/kind bug
What this PR does / why we need it:
fix: add annotation to pv after resize if filesystem resize is necessary. delete when pvc.status.capacity >= pv.spec.capacity
Which issue(s) this PR fixes:
Fixes kubernetes/kubernetes#88683
Special notes for your reviewer:
This PR is a sister PR of kubernetes/kubernetes#99326
Does this PR introduce a user-facing change?: