Skip to content
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 capability for ControllerPublishVolume.readonly field #310

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,10 @@ message ControllerPublishVolumeRequest {
// This is a REQUIRED field.
VolumeCapability volume_capability = 3;

// Whether to publish the volume in readonly mode. This field is
// REQUIRED.
// Whether to publish the volume in readonly mode.
// CO MUST set this field to false if SP does not have the
// PUBLISH_READONLY controller capability.
// This is a REQUIRED field.
bool readonly = 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is making readonly flag optional simpler?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem with making it optional is that the CO doesn't know when to set it. If CO sets it to true and a plugin doesn't support it, what happens? Consider the case where the CO uses the same flag for both ControllerPublish and NodePublish readonly -- we don't want to get in to a case where the CO thinks a volume is readonly but it's not.


// Secrets required by plugin to complete controller publish volume
Expand Down Expand Up @@ -776,6 +778,9 @@ message ControllerServiceCapability {
// the same plugin. Not all volume sources and parameters
// combinations may work.
CLONE_VOLUME = 7;
// Indicates the SP supports ControllerPublishVolume.readonly
// field.
PUBLISH_READONLY = 8;
}

Type type = 1;
Expand Down
Loading