-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip subdirectory creation for invalid volume ID
The only reasonable way that the unpublish command can determine whether to keep or delete the subdirectory, if given, is to bake this information into the volume ID, as the original volume context is not passed to volume unpublish calls. For dynamically created volumes, this is always consistent. However, if the end user defines their own volumes, but does not follow the expected volume handle / volume ID form, that information is not available. In this instance, if the user sets the retain-sub-dir value on a manually created volume to 'false', we will error out and refuse to create the volume. If they request that the subdirectory be retained, we will treat the volume as we do a read-only volume, where we will attempt to mount the given subdirectory, but will not do any logic associated with creating or deleting that subdirectory. As with a read-only volume, if that subdirectory does not exist on the cluster, the mount will fail with a reasonable error.
- Loading branch information
Showing
3 changed files
with
119 additions
and
65 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
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