Commit Graph

26 Commits

Author SHA1 Message Date
730ccc302a Merge pull request #31552 from ripcurld0/add_format_secretls
Add format to secret ls
Upstream-commit: 1ec77baed9f87c9c7cb64ddd2ad203d800ba7efa
Component: engine
2017-03-20 20:20:45 +01:00
6d6cf437f8 Add format to secret ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: e281fe9c3a0034e119e7718a142133e86f38a4f2
Component: engine
2017-03-19 09:22:30 +02:00
943990f090 Add missing API version annotations to commands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e638089622af0448ee0d5d95c45575b63338c938
Component: engine
2017-03-16 13:40:12 +01:00
3526619d18 remove cli/command/secrets/utils.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 51b37a7983435edcd2331571bcb85b2686cbd006
Component: engine
2017-01-29 13:32:49 +08:00
754408c859 Move secret name or ID prefix resolving from client to daemon
This fix is a follow up for comment:
https://github.com/docker/docker/pull/28896#issuecomment-265392703

Currently secret name or ID prefix resolving is done at the client
side, which means different behavior of API and CMD.

This fix moves the resolving from client to daemon, with exactly the
same rule:
- Full ID
- Full Name
- Partial ID (prefix)

All existing tests should pass.

This fix is related to #288896, #28884 and may be related to #29125.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa358a87571f9212f91d8fde6696926d76ecca64
Component: engine
2017-01-27 10:40:05 -08:00
5ed83fcbc5 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ec84ef76df30663d5728f903b314f4486587135
Component: engine
2017-01-26 11:33:15 -05:00
589e081a09 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: db6652ca71c60c1ff3ac274968876c88eb7146ad
Component: engine
2017-01-06 14:07:48 -08:00
0de1da63ca Clean some stuff from runconfig that are cli only…
… or could be in `opts` package. Having `runconfig/opts` and `opts`
doesn't really make sense and make it difficult to know where to put
some code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: c424be21b7aa732681ed019b5e547a99fdc2afa5
Component: engine
2016-12-24 13:16:00 +01:00
c3c5d1b1fc Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c6f0b7f448fac4d037d00f944a7908c60c04dff2
Component: engine
2016-12-13 07:35:45 -08:00
085088f73e Fix issue where secret ID is masked by name
This fix tries to address the issue in 28884 where
it is possible to mask the secret ID by name.

The reason was that searching a secret is based on name.
However, searching a secret should be done based on:
- Full ID
- Full Name
- Partial ID (prefix)

This fix addresses the issue by changing related implementation
in `getCliRequestedSecretIDs()`

An integration test has been added to cover the changes.

This fix fixes 28884

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3638ca4d14bcca9bc924f21314e4a1020cd5172f
Component: engine
2016-12-02 20:24:29 -08:00
77750af0f0 Merge pull request #28922 from yuexiao-wang/fix-secret
Fix the inconsistency for secret ls and secrect rm
Upstream-commit: a3be176f139e8fd54b985c5876eb677250890805
Component: engine
2016-12-01 11:29:58 +01:00
54c33a1c13 Fix the use for secret create
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5cef55ba9178604c67d99774526cf055c7d0aafe
Component: engine
2016-12-01 19:48:33 +08:00
7fb4d2bab8 Fix the inconsistency for docker secret
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b4306588e982481c46708c535d5bfc5efdbd4cd8
Component: engine
2016-11-30 17:23:39 +08:00
ad81663166 change secret remove logic in cli
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5b93e77138f19d30245a3e0f9f8f834aa67458ec
Component: engine
2016-11-29 15:12:05 +08:00
99086026bc update secret command
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: d87c91e39ff0d3defb5b98fdc9275c8c0bfc987e
Component: engine
2016-11-23 10:07:09 -05:00
afb23f3459 Merge pull request #28716 from ehazlett/fix-multi-secret-inspect
Update secret inspect to support IDs
Upstream-commit: 7c6f001248cb6dffbffad4470caaa96e759cfe26
Component: engine
2016-11-22 17:39:48 -08:00
2e3fe52bff Do not display the digest or size of swarm secrets
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 2c0613540a25d45069d142542e572bb6338e4155
Component: engine
2016-11-22 18:13:27 -05:00
9e9aefeaf8 update secret inspect to support IDs
This updates secret inspect to support inspect by ID in addition to name
as well as inspecting multiple secrets.  This also cleans up the
help text for consistency.

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 70d2cefd51e853ca4f3bbf8eb0386360809e026b
Component: engine
2016-11-22 16:01:16 -05:00
2e39dde1e5 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: bf95472105e5dad55314cfff599abea5b81b134a
Component: engine
2016-11-17 10:54:10 -08:00
70633c7349 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
Upstream-commit: aff5dacec190e8d94c6b796b06c773c8b1b223fe
Component: engine
2016-11-12 14:14:34 +08:00
c27b5695c1 fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 8e701f0bd7f6be30d8b23010b2a7daf8e15981ec
Component: engine
2016-11-09 17:11:14 -08:00
807eb50cc6 use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 880e8be1eea086ee83e5ad22f953696365c5b799
Component: engine
2016-11-09 14:27:46 -05:00
19e0a8c065 support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 583c013a8735031f4e5090bb1699effb64daf950
Component: engine
2016-11-09 14:27:45 -05:00
e093728442 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: b2e4c7f3b5b30fc6940768ec41836d708a48b463
Component: engine
2016-11-09 14:27:45 -05:00
c28de44f7a secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: e0e65b9a3baab6bb3f35eddb6ed3d52654184029
Component: engine
2016-11-09 14:27:45 -05:00
9dbbc071d5 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3716ec25b423d8ff7dfa231a7b3cf0154726ed37
Component: engine
2016-11-09 14:27:43 -05:00