-
Notifications
You must be signed in to change notification settings - Fork 349
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
doc: UML diagram for volume creation and deletion #532
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,32 @@ | ||
@startuml | ||
(*) -->[ **user** creates PVC ] "PVC exists" | ||
-->[ **PV controller** checks storage class and existing PVs ] ==B1== | ||
|
||
==B1== -->[= __immediate binding:__\lif necessary, **PV controller** sets the\l""volume.beta.kubernetes.io/storage-provisioner""\lannotation] "PVC ready for provisioning" as PVC_READY_IMMEDIATE | ||
-->"CreateVolume for all nodes" as CREATE_VOLUME_ALL | ||
-->[failure] "PVC_READY_IMMEDIATE" | ||
CREATE_VOLUME_ALL -->[success] ==B2== | ||
|
||
==B1== -->[= __late binding__] "wait for pod" as POD | ||
-->[ **scheduler** tentatively chooses a node for the pod\lwhich uses the volume and sets the\l""volume.beta.kubernetes.io/selected-node""\lannotation ] "PVC with selected node" as PVC_SELECTED | ||
-->[if necessary, **PV controller** sets the\l""volume.beta.kubernetes.io/storage-provisioner""\lannotation ] "PVC with selected node ready for provisioning" as PVC_SELECTED_READY | ||
--> "CreateVolume for selected node" as CREATE_VOLUME_SELECTED | ||
-->[""ResourceExhausted"":\l**external-provisioner**\lunsets the\l""selected-node"" annotation] "POD" | ||
CREATE_VOLUME_SELECTED -->[failure] "PVC_SELECTED_READY" | ||
CREATE_VOLUME_SELECTED -->[success] ==B2== | ||
|
||
==B2== --> "volume exists" as VOLUME_EXISTS | ||
-->[ **external-provisioner** creates PV ] "PV ready for binding" | ||
-->[ **PV controller** sets\l* ""PV.Status.Phase: Bound"" ] "PV bound" | ||
-->[ **PV controller** sets\l* ""pv.kubernetes.io/bind-completed: yes""\l* ""pv.kubernetes.io/bound-by-controller: yes""\l* ""PVC.Spec.VolumeName""] "PVC almost bound" | ||
-->[ **PV controller** sets\l* ""PVC.Status.Phase: Bound""\l* ""PVC.Status.Capacity"" ] "PVC bound" | ||
-->[ **user** deletes PVC ] "PVC marked for deletion" | ||
-->[ **PVC protection controller** determines that PVC 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 PV has no volume ] "PV deleted" | ||
--> (*) | ||
@enduml |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is really useful for developers of external-provisioner/pv controller, but I like to keep the README focused on users. Can we move this to a docs/ subpage and reference it from the readme?
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.
Okay.