Add output for "secrets" and "configs" on stack deploy#593
Merged
cpuguy83 merged 1 commit intodocker:masterfrom Oct 3, 2017
Merged
Add output for "secrets" and "configs" on stack deploy#593cpuguy83 merged 1 commit intodocker:masterfrom
cpuguy83 merged 1 commit intodocker:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #593 +/- ##
==========================================
- Coverage 49.41% 49.41% -0.01%
==========================================
Files 208 208
Lines 17184 17186 +2
==========================================
Hits 8492 8492
- Misses 8260 8262 +2
Partials 432 432 |
vdemeester
requested changes
Oct 3, 2017
| } | ||
| case apiclient.IsErrConfigNotFound(err): | ||
| // config does not exist, then we create a new one. | ||
| fmt.Fprintf(dockerCli.Out(), "Creating secret %s\n", configSpec.Name) |
When deploying a stack from a compose file, the output did not show
that a secret or config was created. This patch adds messages for these.
Create a configuration file and compose file:
$ cat > config.yml <<EOF
hello: world
EOF
$ cat > secret.txt <<EOF
p@ssw0rd
EOF
$ cat > docker-compose.yml <<EOF
version: "3.3"
services:
test:
image: nginx:alpine
configs:
- source: myconfig
target: /my-config.yml
secrets:
- source: mysecret
target: /my-secret.txt
configs:
myconfig:
file: ./config.yml
secrets:
mysecret:
file: ./secret.txt
EOF
Before this patch is applied:
$ docker stack deploy -c docker-compose.yml example
Creating network example_default
Creating service example_test
After this patch is applied:
$ docker stack deploy -c docker-compose.yml example
Creating network example_default
Creating secret example_mysecret
Creating config example_myconfig
Creating service example_test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
edc3be6 to
a5113f4
Compare
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.
When deploying a stack from a compose file, the output did not show
that a secret or config was created. This patch adds messages for these.
Create a configuration file and compose file:
Before this patch is applied:
After this patch is applied:
- What I did
Added additional messages during
docker stack deploy- How to verify it
See steps above
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)