Commit Graph

5314 Commits

Author SHA1 Message Date
00a2e2286e Updated the go-winio library to release 0.4.8 that has the fix for Windows containers
Signed-off-by: Tejaswini Duggaraju <naduggar@microsoft.com>
Upstream-commit: c98c4080a3
Component: cli
2018-06-29 10:49:52 -07:00
b47e46b815 Merge pull request #1023 from simonferquel/k8s-stack-services-filters
[Kubernetes] stack services filters
Upstream-commit: 0089f172b7
Component: cli
2018-05-24 19:56:33 +02:00
79dd15d857 Match Swarm in how to combine filters
`docker stack services --filter=label=foo=bar --filter=label=foo=baz my-stack` with Swarm gets handled as `filter on (a label named foo with value bar) AND (a label named foo with value baz).
This obviously yields an empty result set every time, but if and how this should be changed is out of scope here, so simply align Kubernetes with Swarm for now.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 297866ebbe
Component: cli
2018-05-24 15:24:23 +02:00
11041e23de Merge pull request #1079 from thaJeztah/fix_update_memory_cpu_limit
Fix cpu/memory limits and reservations being reset on service update
Upstream-commit: 57ce5aa18d
Component: cli
2018-05-24 12:01:22 +02:00
042cb41dcc Merge pull request #1080 from vdemeester/update-vndr
Update vndr commit to latest
Upstream-commit: 73078131e6
Component: cli
2018-05-24 10:02:52 +02:00
2b328bedc5 Update vndr commit to latest
Some fixes and it also preserves directories with *.c files now.

See a6e196d8b4...1fc68ee0c8

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 08d6c18570
Component: cli
2018-05-24 09:39:22 +02:00
5fba89897b Minor refactor: use anyChanged() to detect changed flags
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df9a0c7797
Component: cli
2018-05-24 01:30:09 +02:00
467129b37c Fix cpu/memory limits and reservations being reset on service update
Before this change:
----------------------------------------------------

Create a service with reservations and limits for memory and cpu:

    docker service create --name test \
      --limit-memory=100M --limit-cpu=1 \
      --reserve-memory=100M --reserve-cpu=1 \
      nginx:alpine

Verify the configuration

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      }
    }

Update just CPU limit and reservation:

    docker service update --limit-cpu=2 --reserve-cpu=2 test

Notice that the memory limit and reservation is not preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000
      },
      "Reservations": {
        "NanoCPUs": 2000000000
      }
    }

Update just Memory limit and reservation:

    docker service update --limit-memory=200M --reserve-memory=200M test

Notice that the CPU limit and reservation is not preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "MemoryBytes": 209715200
      },
      "Reservations": {
        "MemoryBytes": 209715200
      }
    }

After this change:
----------------------------------------------------

Create a service with reservations and limits for memory and cpu:

    docker service create --name test \
      --limit-memory=100M --limit-cpu=1 \
      --reserve-memory=100M --reserve-cpu=1 \
      nginx:alpine

Verify the configuration

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 1000000000,
        "MemoryBytes": 104857600
      }
    }

Update just CPU limit and reservation:

    docker service update --limit-cpu=2 --reserve-cpu=2 test

Confirm that the CPU limits/reservations are updated, but memory limit and reservation are preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 104857600
      },
      "Reservations": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 104857600
      }
    }

Update just Memory limit and reservation:

    docker service update --limit-memory=200M --reserve-memory=200M test

Confirm that the Mempry limits/reservations are updated, but CPU limit and reservation are preserved:

    docker service inspect --format '{{json .Spec.TaskTemplate.Resources}}' test
    {
      "Limits": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 209715200
      },
      "Reservations": {
        "NanoCPUs": 2000000000,
        "MemoryBytes": 209715200
      }
    }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df43eb931e
Component: cli
2018-05-24 01:30:00 +02:00
b8ca625f10 Add filter support for stack ps and services with Kubernetes
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 1f7aa1c036
Component: cli
2018-05-23 18:27:27 +02:00
274de24328 Merge pull request #1070 from taiji-tech/master
Update document links of help and comments to make it up-to-date
Upstream-commit: fd6165399d
Component: cli
2018-05-22 16:00:10 +02:00
98885f36d7 Update document links and title.
Signed-off-by: taiji-tech <csuhqg@foxmail.com>
Upstream-commit: 5119c4d8ef
Component: cli
2018-05-22 21:13:41 +08:00
d036351aa0 Merge pull request #1035 from mat007/kubernetes-check-hosts-match
For docker stack ls make an error if Swarm and Kubernetes hosts do not match
Upstream-commit: cc6ff56fd5
Component: cli
2018-05-22 14:50:09 +02:00
9d23e60e14 Merge pull request #1076 from vdemeester/fix-e2e-system
Fix e2e/system tests
Upstream-commit: 56fc890f35
Component: cli
2018-05-22 14:46:44 +02:00
de98e98ecd For docker stack ls make an error if Swarm and Kubernetes hosts do no match
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: bfe9aed63a
Component: cli
2018-05-22 14:39:48 +02:00
e48b3121b7 Fix e2e/system tests
a setup step is required and the test fails.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0016ff9c15
Component: cli
2018-05-22 14:36:41 +02:00
eba4c4ac67 Merge pull request #1072 from AntaresS/add-inspect-test
move inspect test from moby to cli
Upstream-commit: 0022bb83ea
Component: cli
2018-05-21 15:01:03 -10:00
c83bf05cc2 move inspect test from moby to cli
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 2d8d5fcd30
Component: cli
2018-05-21 15:57:39 -07:00
364c8ffbeb Merge pull request #1043 from justyntemme/patch-2
Fix issue #850, Warn user of filter when pruning
Upstream-commit: 680c5790d5
Component: cli
2018-05-22 00:26:26 +02:00
beaa0fd5b3 Merge pull request #1069 from thaJeztah/bump-cobra-pflags
Update Cobra and pflag, and use built-in --version feature
Upstream-commit: 09115e3750
Component: cli
2018-05-21 15:23:16 -07:00
1eb50df5ea Merge pull request #1054 from thaJeztah/fix-host-rm-being-too-greedy
Fix service update --host-rm not being granular enough
Upstream-commit: 7bdd820f28
Component: cli
2018-05-21 15:21:06 -07:00
c631ba5714 Merge pull request #1053 from justyntemme/patch-3
Change error message for unreadable files
Upstream-commit: 9a89c32e9a
Component: cli
2018-05-22 00:12:46 +02:00
e94b458971 Merge pull request #1071 from AntaresS/fix-inspect-error
fix error message from docker inspect
Upstream-commit: 26123be73b
Component: cli
2018-05-21 20:39:59 +02:00
c7c3e2db9d fix error message from docker inspect
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: d2090430a6
Component: cli
2018-05-21 11:32:16 -07:00
31fc695941 Hide [flags] in usage output
This patch hides the [flags] in the usage output of commands, using the
new `.DisableFlagsInUseLine` option, instead of the temporary workaround
added in 8e600e10f7

Before this change:

    docker run
    "docker run" requires at least 1 argument.
    See 'docker run --help'.

    Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...] [flags]

    Run a command in a new container

After this change:

    docker run
    "docker run" requires at least 1 argument.
    See 'docker run --help'.

    Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

    Run a command in a new container

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00d080269a
Component: cli
2018-05-19 02:51:55 +02:00
6e165aeab9 Use Cobra built-in --version feature
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3fe7d62b8
Component: cli
2018-05-19 02:51:43 +02:00
efb6dd914b Bump spf13/cobra to v0.0.3, spf13/pflag to v1.0.1
Use a tagged release of Cobra

Relevant changes:

- spf13/cobra#567 Add `CalledAs` method to cobra.Command
- spf13/cobra#580 Update error message for missing required flags
- spf13/cobra#584 Add support for --version flag
- spf13/cobra#614 If user has a project in symlink, just use its destination folder and work there
- spf13/cobra#649 terminates the flags when -- is found in commandline
- spf13/cobra#662 Add support for ignoring parse errors
- spf13/cobra#686 doc: hide hidden parent flags

Also various improvements were added for generating Bash
completion scripts (currently not used by us)

Bump spf13/pflag to v1.0.1

Relevant changes:

- spf13/pflag#122 DurationSlice: implementation and tests
- spf13/pflag#115 Implement BytesHex type of argument
- spf13/pflag#150 Add uintSlice and boolSlice to name prettifier
- spf13/pflag#155 Add multiline wrapping support
- spf13/pflag#158 doc: clarify difference between string slice vs. array
- spf13/pflag#160 add ability to ignore unknown flags
- spf13/pflag#163 Allow Users To Show Deprecated Flags

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0acb2522bd
Component: cli
2018-05-19 02:51:33 +02:00
f415b9c697 Merge pull request #1066 from mauroporrasp/patch-1
Minor fix: "stdin" instead of "stding"
Upstream-commit: 824ce49aff
Component: cli
2018-05-18 16:39:50 +02:00
771b7b3484 Minor fix: "stdin" instead of "stding"
Signed-off-by: Mauro Porras P <mauroporrasp@gmail.com>
Upstream-commit: acf3d2d95a
Component: cli
2018-05-18 08:48:42 -05:00
0e83593715 Merge pull request #1065 from thaJeztah/fix-kube-alignment
Fix component information alignment
Upstream-commit: b15c3cfec9
Component: cli
2018-05-18 14:54:42 +02:00
1dc5256c77 Fix component information alignment
The `docker version` output now uses a tabwriter, so use single
tabs to print the output.

Before this change:

    Server:
     Engine:
      Version:      18.05.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.10.1
      Git commit:   f150324
      Built:        Wed May  9 22:20:16 2018
      OS/Arch:      linux/amd64
      Experimental: true
     Kubernetes:
      Version:     v1.9.6
      StackAPI:                   v1beta2

After this change:

    Server:
     Engine:
      Version:      18.05.0-ce
      API version:  1.37 (minimum version 1.12)
      Go version:   go1.10.1
      Git commit:   f150324
      Built:        Wed May  9 22:20:16 2018
      OS/Arch:      linux/amd64
      Experimental: true
     Kubernetes:
      Version:     v1.9.6
      StackAPI:    v1beta2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 26d8122594
Component: cli
2018-05-18 14:46:23 +02:00
baeeaceada Merge pull request #1034 from mat007/kubernetes-orchestrator-query-ucp
Better user experience with Kubernetes namespaces for UCP
Upstream-commit: 7de6aaec17
Component: cli
2018-05-18 14:39:44 +02:00
b6e3522638 Query UCP Kubernetes user namespaces endpoint
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: bd20885ac8
Component: cli
2018-05-18 11:44:15 +02:00
802dab1037 Bump moby to d37f5c6bdf788a6cb82c07fb707e31a240eff5f9
Also bringing:
. golang.org/x/net 5561cd9b4330353950f399814f427425c0a26fd2
. github.com/docker/distribution 83389a148052d74ac602f5f1d62f86ff2f3c4aa5
. github.com/docker/swarmkit bd69f6e8e301645afd344913fa1ede53a0a111fb
. github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
. github.com/prometheus/client_golang 52437c81da6b127a9925d17eb3a382a2e5fd395e
. github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
. github.com/prometheus/client_model fa8ad6fec33561be4280a8f0514318c79d7f6cb6
. github.com/prometheus/common ebdfc6da46522d58825777cf1f90490a5b1ef1d8
. github.com/prometheus/procfs abf152e5f3e97f2fafac028d2cc06c1feb87ffa5
. github.com/matttproud/golang_protobuf_extensions v1.0.0

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 5d54584f03
Component: cli
2018-05-18 11:44:14 +02:00
48d3d7fdc0 Merge pull request #1063 from nkwangleiGIT/master
Update some document links of help markdown files
Upstream-commit: 3c45963646
Component: cli
2018-05-18 11:34:17 +02:00
d1519025fc Merge pull request #1061 from eiais/fishupdate
Update Events, Exec, Export, History, Images, Import, Inspect, Load, and Login subcommand fish completions
Upstream-commit: 6bab4a2a94
Component: cli
2018-05-17 14:50:29 +02:00
b38bc2a3c0 Merge pull request #1040 from cyli/deprecated-engine-labels
Document reserved namespaces deprecation
Upstream-commit: 96dba79d99
Component: cli
2018-05-16 23:16:28 +02:00
7fa75adc44 Document that reserved namespaces org.docker.*, io.docker.*, and
org.dockerproject.* in engine labels are now deprecated.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 7470d460f6
Component: cli
2018-05-16 14:06:37 -07:00
cbe1e262f7 Merge pull request #974 from simonferquel/compose-kube-env-expansion
[K8s] Do env-variable expansion on the uninterpreted Config files
Upstream-commit: bac0d8f353
Component: cli
2018-05-16 20:18:41 +02:00
6f83cf6fa8 Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: nkwangleiGIT <nkwanglei@126.com>
Upstream-commit: b6def77c55
Component: cli
2018-05-16 20:16:08 +08:00
d82d36fd4a Merge pull request #1031 from mat007/kubernetes-orchestrator-all
Better stack list experience with Kubernetes and Swarm
Upstream-commit: 5a5b880251
Component: cli
2018-05-15 17:26:41 +02:00
7a57bbc2b9 Support multiple namespaces for docker stack ls
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 84241cc393
Component: cli
2018-05-15 16:52:21 +02:00
46fae6da7e Support 'all' in orchestrator flag for docker stack ls
All other docker stack commands report an error when passed this value.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 4d947de292
Component: cli
2018-05-15 15:38:41 +02:00
c4cff872f5 Fix typo in golden file name
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
Upstream-commit: 0d7bb8adaa
Component: cli
2018-05-15 10:09:47 +02:00
96a20527d5 Merge pull request #1048 from thaJeztah/bump-golang-1.10.2
Bump Golang to 1.10.2
Upstream-commit: 5aa9d6a35f
Component: cli
2018-05-14 16:20:46 +02:00
c0eb53edfc Bump Golang to 1.10.2
Go 1.10 release notes: https://golang.org/doc/go1.10

Go 1.10: https://github.com/golang/go/issues?q=milestone%3AGo1.10
Go 1.10.1: https://github.com/golang/go/issues?q=milestone%3AGo1.10.1
Go 1.10.2: https://github.com/golang/go/issues?q=milestone%3AGo1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ee7aa76cff
Component: cli
2018-05-14 16:04:13 +02:00
09aea6c1ab Merge pull request #1055 from mat007/fix-invalid-orchestrator-silently-ignored
Make an error for an invalid orchestrator
Upstream-commit: 161bc1ed3c
Component: cli
2018-05-14 15:34:01 +02:00
be4eb540c9 Merge pull request #1045 from ieugen/ieugen/patch-1
Added description about pids count.
Upstream-commit: fdf94de537
Component: cli
2018-05-14 13:32:47 +02:00
40ccb62e61 Merge pull request #1052 from thaJeztah/fix-rollback-config
Fix service rollback options being cross-wired
Upstream-commit: 74d86d4b2e
Component: cli
2018-05-14 11:01:56 +02:00
fda16ddde1 Merge pull request #1037 from essamhassan/1036_fix_mounts_typo_in_srv_inspect_pretty
use : instead of = in mounts service pretty inspect
Upstream-commit: d4ffd9bc71
Component: cli
2018-05-14 10:55:41 +02:00
3ef5a0bd8a Merge pull request #1038 from kolyshkin/context
Switch from x/net/context to context
Upstream-commit: fd060d2f33
Component: cli
2018-05-11 22:13:52 -04:00