-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: UML diagram for volume creation and deletion
While this information is available in various design documents, users of the external-provisioner benefit from getting a summary directly in the documentation of external-provisioner. This is a good opportunity to call our expected behavior of the CSI driver.
- Loading branch information
Showing
5 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ CMDS=csi-provisioner | |
all: build | ||
|
||
include release-tools/build.make | ||
include doc/doc.make |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# We use the http://plantuml.com/plantuml server to generate | ||
# images. That way nothing needs to be installed besides Go. | ||
# The client tool has no license, so we can't vendor it. | ||
# Instead we "go get" it if (and only if) needed. | ||
DOC_PLANTUML_GO = $(shell go env GOPATH)/bin/plantuml-go | ||
|
||
%.png: %.puml $(DOC_PLANTUML_GO) | ||
$(DOC_PLANTUML_GO) -format png $< | ||
|
||
# Builds the binary in GOPATH/bin. Changing into / first avoids | ||
# modifying the project's go.mod file. | ||
$(DOC_PLANTUML_GO): | ||
cd / && go get github.com/acarlson99/plantuml-go |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@startuml | ||
(*) -->[user creates PVC] "PVC exists" | ||
-->[PV controller checks storage class and existing PVs, sets the\nvolume.beta.kubernetes.io/storage-provisioner annotation] "PVC ready for provisioning" as PVC_READY | ||
--> ==B1== | ||
|
||
==B1== -->[immediate binding] "CreateVolume for all nodes" as CREATE_VOLUME_ALL | ||
-->[failure] "PVC_READY" | ||
CREATE_VOLUME_ALL -->[success] ==B2== | ||
|
||
==B1== -->[late binding] "wait for pod" as POD | ||
-->[scheduler tentatively chooses a node for a pod\nwhich uses the volume and sets the\nvolume.beta.kubernetes.io/selected-node annotation] "PVC with selected node ready for provisioning" as PVC_READY_SELECTED | ||
--> "CreateVolume for selected node" as CREATE_VOLUME_SELECTED | ||
-->[ResourceExhausted:\nexternal-provisioner unsets the\nselected-node annotation] "POD" | ||
CREATE_VOLUME_SELECTED -->[failure] "PVC_READY_SELECTED" | ||
CREATE_VOLUME_SELECTED -->[success] ==B2== | ||
|
||
==B2== --> "volume exists" as VOLUME_EXISTS | ||
-->[external-provisioner creates PV] "PV ready for binding" | ||
-->[PV controller sets 'PV.Status.Phase: Bound'] "PV bound" | ||
-->[PV controller sets\npv.kubernetes.io/bind-completed: yes\npv.kubernetes.io/bound-by-controller: yes\n'PVC.Spec.VolumeName'] "PVC almost bound" | ||
-->[PV controller sets 'PVC.Status.Phase: Bound'\nand 'PVC.Status.Capacity'] "PVC bound" | ||
-->[user deletes PVC] "PVC marked for deletion" | ||
-->[PVC protection controller determines that\nPVC is not in use] "PVC deleted, PV orphaned" as VOLUME_READY_FOR_DELETION | ||
--> "DeleteVolume" | ||
DeleteVolume -->[failure] VOLUME_READY_FOR_DELETION | ||
DeleteVolume -->[success] "volume deleted" | ||
-->[external-provisioner set 'PV.Status.Phase: Released'] "PV ready for deletion" as PV_READY_FOR_DELETION | ||
-->[external-provisioner deletes PV] "PV marked for deletion" | ||
-->[PV controller determines that\nPV has no volume] "PV deleted" | ||
--> (*) | ||
@enduml |