-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Make compose file allow to specify names for non-external volume #306
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: "3.3" | ||
version: "3.4" | ||
|
||
services: | ||
foo: | ||
|
@@ -280,6 +280,15 @@ volumes: | |
foo: "bar" | ||
baz: 1 | ||
|
||
another-volume: | ||
name: "user_specified_name" | ||
driver: vsphere | ||
|
||
driver_opts: | ||
# Values can be strings or numbers | ||
foo: "bar" | ||
baz: 1 | ||
|
||
external-volume: | ||
# Specifies that a pre-existing volume called "external-volume" | ||
# can be referred to within this file as "external-volume" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Add the comment. |
||
|
@@ -288,5 +297,12 @@ volumes: | |
other-external-volume: | ||
# Specifies that a pre-existing volume called "my-cool-volume" | ||
# can be referred to within this file as "other-external-volume" | ||
# This example uses the deprecated "volume.external.name" (replaced by "volume.name") | ||
external: | ||
name: my-cool-volume | ||
|
||
external-volume3: | ||
# Specifies that a pre-existing volume called "this-is-volume3" | ||
# can be referred to within this file as "external-volume3" | ||
name: this-is-volume3 | ||
external: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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'd like to see an example using a
name
andexternal
, for example;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.
Also (not sure if that needs to be done in this file, or another one); can we have a test that tests if setting both
volume.name
andvolume.external.name
produces the "conflicting options" error? i.e.;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.
A separate test case for testing the conflict would be great
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.
Done. Add a test case in for that.