-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add text about using multiple PVCs on a pod with the annotation. #41
Add text about using multiple PVCs on a pod with the annotation. #41
Conversation
README.md
Outdated
@@ -14,6 +14,8 @@ The main differences between this provisioner and the standard hostpath provisio | |||
3. Or if you do not want to specify the node on the claim, you can specify `volumeBindingMode: WaitForFirstConsumer` in the storage class. Then the PV will be created only when the first Pod using this PVC is scheduled. The PV will be created on the node that the Pod is scheduled on. | |||
Still, the annotation `kubevirt.io/provisionOnNode` can be used in this mode, though it will not wait for the first consumer. | |||
|
|||
_There is on caveat with using the annotation, if you have a pod that uses multiple PVCs and you annotate one, you should annotate all of them otherwise there can be a race condition where the Kubernetes scheduler can decide to schedule the pod on a node you did not specify in your annotation._ |
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 one caveat...
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 think this could be clarified...
In cases where multiple PVCs are to be used with a Pod it is not recommended to mix the WaitForFirstConsumer binding mode with the provisionOnNode annotation. All of a Pod's PVCs should carry the annotation or none should. Mixing modes can result in PVCs being allocated from different nodes leaving your Pod unschedulable.
8369cb4
to
73f997b
Compare
/retest |
Signed-off-by: Alexander Wels <[email protected]>
73f997b
to
f2ff491
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awels The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Alexander Wels [email protected]
What this PR does / why we need it:
Explain that using the annotation together with multiple PVCs for a single pod can lead to issues if you don't annotate all the PVCs used with the pod.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: