Update service networks documentation#39495
Merged
cpuguy83 merged 1 commit intomoby:masterfrom Nov 5, 2019
Merged
Conversation
The previous description stated that an array of names / ids could be passed when the API in reality expects objects in the form of NetworkAttachmentConfig. This is fixed by updating the description and adding a definition for NetworkAttachmentConfig. Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
d7cddec to
4d09fab
Compare
Codecov Report
@@ Coverage Diff @@
## master #39495 +/- ##
=========================================
Coverage ? 37.32%
=========================================
Files ? 609
Lines ? 45224
Branches ? 0
=========================================
Hits ? 16878
Misses ? 26057
Partials ? 2289 |
Contributor
Author
|
Let me know if there's anything I can help with regarding this PR. Thanks! |
AkihiroSuda
approved these changes
Oct 31, 2019
Member
Member
|
re: Being able to set it two places, yes it is confusing. The method of setting it in the TaskTemplate I believe was added later for greater flexibility. |
Contributor
Author
|
@cpuguy83 @AkihiroSuda thanks for the review and merge. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR updates the documentation for the
/services/API. It fixes some issues around theNetworksparameter.The previous description stated that an array of names / ids could be passed when the API in reality expects objects in the form of
NetworkAttachmentConfig. This is fixed by updating the description and adding a definition forNetworkAttachmentConfig.Also it's quite confusing that
Networkscan both be specified in the service spec and in theTaskTemplate. From my understanding the correct way to passNetworksis throughTaskTemplate:moby/daemon/cluster/networks.go
Lines 304 to 306 in aa8249a
I have not found any official information about
Networksin the service spec being deprecated but it would probably be good to write something about this in the description for this parameter. Not really sure about the correct wording for this so I would glad to get some advice here.The
Networksparameter in the service spec also crashes when clicked, looks like this issue #32917. This makes it extra confusing with the current description about expecting an array of ids / names since the expected format can't be expanded.