Commit graph

233 commits

Author SHA1 Message Date
Sebastiaan van Stijn
4679ffd01c
docs: remove HostConfig.LxcConf field from API docs
Commit 3b5fac462d  / docker 1.10 removed support
for the LXC runtime, and removed the corresponding fields from the API (v1.22).

This patch removes the `HostConfig.LxcConf` field from the API documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 839e2ecc1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:21:13 +01:00
Sebastiaan van Stijn
a5a697143d
docs: fixing /exec/{id}/resize response code in API documentation
This takes the changes from 1a933e113d and
834272f978, and applies them to older API
versions in the docs directory (which are used for the actual documentation).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2145f3ba2c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:20:25 +01:00
Felipe Ruhland
ca5ba4890e
Fix typo on the v1.41 changelog
Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
(cherry picked from commit eefb6c672a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 13:19:21 +01:00
Sebastiaan van Stijn
f9344b45fe
api/swagger: move DistributionInspect to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 16cb04c2e8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:21 +01:00
Sebastiaan van Stijn
13cb9d9723
api/swagger: rename PluginPrivilegeItem to PluginPrivilege
To match the name in Go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ebd709f80c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:19 +01:00
Sebastiaan van Stijn
7f9760e10c
api/swagger: fix up event-types and move to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0b5a2e3c87)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:18 +01:00
Sebastiaan van Stijn
e6739a2884
api/swagger: move DistributionInspect to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a65804adc4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:17 +01:00
Sebastiaan van Stijn
d445d24804
api/swagger: rename PluginPrivilegeItem to PluginPrivilege
To match the name in Go

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 24a43d934c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:16 +01:00
Sebastiaan van Stijn
5e38ae84b2
api/swagger: fix up event-types and move to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 92ed6ca356)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:14 +01:00
Tobias Gesellchen
012fdff916
Fix swagger docs to match the opencontainers image-spec
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 62cf748df9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:13 +01:00
Tobias Gesellchen
13cbf7fbb7
Extract PluginPrivilegeItem as explicit type definition
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6153c2f08d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:12 +01:00
Tobias Gesellchen
8fbcf0611b
Use explicit object names for improved swagger based code generation
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit be93e50a58)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:11 +01:00
Tobias Gesellchen
b8bee972c4
Fix ContainerSummary swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8168d1877d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:09 +01:00
Tobias Gesellchen
7092a6091c
Add "changes" query parameter for /image/create to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e719f8a00)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:08 +01:00
Tobias Gesellchen
adf1e470a1
Add RestartPolicy "no" to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d3d78c1ae3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:07 +01:00
Tobias Gesellchen
b4b469eac2
Fix swagger docs to match the opencontainers image-spec
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c0bc82cef1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:06 +01:00
Tobias Gesellchen
2c38a2a635
Extract PluginPrivilegeItem as explicit type definition
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7248ebcd7e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:04 +01:00
Tobias Gesellchen
621bfddd6e
Use explicit object names for improved swagger based code generation
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6e421a1823)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:03 +01:00
Tobias Gesellchen
8a5240a8aa
Fix ContainerSummary swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9ac2d04617)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:02 +01:00
Tobias Gesellchen
751cf68e36
Add "changes" query parameter for /image/create to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 050f5f29f7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:03:00 +01:00
Tobias Gesellchen
a961b76aef
Add RestartPolicy "no" to swagger docs
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 90294e9bdb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-20 16:02:49 +01:00
Sebastiaan van Stijn
50c392c9ff
API: fix 404 status description on container create
This updates the current swagger file, and all docs versions
with the same fix as ff1d9a3ec5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 68b095d4df)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-07 11:50:43 +02:00
Matt Morrison
025e3a7898
Update v1.41.yaml
fix containers/create 404 response description

Signed-off-by: Matt Morrison <3241034+Emdot@users.noreply.github.com>
(cherry picked from commit ff1d9a3ec5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-07 11:50:26 +02:00
Sebastiaan van Stijn
04d9b581e9
Update documentation links
- Using "/go/" redirects for some topics, which allows us to
  redirect to new locations if topics are moved around in the
  documentation.
- Updated some old URLs to their new location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 328de0b8d9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-25 21:54:39 +01:00
Tibor Vass
b81e649d2b
Merge pull request #41977 from thaJeztah/20.10_backport_minor_fixes
[20.10 backport] assorted small fixes, docs changes, and contrib
2021-02-18 12:29:07 -08:00
Sebastiaan van Stijn
c00fb1383f
docs: fix double "the" in existing API versions
Backport of 2db5676c6e to the swagger files
used in the documentation

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 240d0b37bb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-17 21:17:42 +01:00
Sebastiaan van Stijn
6e3f2acdac
docs: fix NanoCPUs casing
While the field in the Go struct is named `NanoCPUs`, it has a JSON label to
use `NanoCpus`, which was added in the original pull request (not clear what
the reason was); 846baf1fd3

Some notes:

- Golang processes field names case-insensitive, so when *using* the API,
  both cases should work, but when inspecting a container, the field is
  returned as `NanoCpus`.
- This only affects Containers.Resources. The `Limits` and `Reservation`
  for SwarmKit services and SwarmKit "nodes" do not override the name
  for JSON, so have the canonical (`NanoCPUs`) casing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e2343ffd4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-17 21:15:21 +01:00
Sebastiaan van Stijn
9122cd1a75
docs: add API v1.41
This copies the current swagger.yaml to the docs as v1.41.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-10 15:28:38 +01:00
Tonis Tiigi
8cc0fd811e docs: fix builder-version swagger
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-10-26 20:17:50 -07:00
Nikolay Edigaryev
7afef854ed api: clarify "v" option behavior in the container remove endpoint
Current description of the "v" option doesn't explain what happens to
the volumes that are still in use by other containers. Turns out that
the only volumes that are removed are unnamed ones[1].

Perhaps a good way of clarifying this behavior would be adapting the
description from "docker rm --help".

As for the docs/api/v1.*.yaml changes — they seem to be applicable,
since the origin of this behavior dates way back to the 2016 or v1.11[2].

[1]: a24a71c50f/daemon/mounts.go (L34-L38)
[2]: dd7d1c8a02

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2020-09-23 12:34:52 +03:00
Nikolay Edigaryev
13e0ba700a swagger: fix MemTotal units in SystemInfo endpoint
MemTotal represents bytes, not kilobytes. See Linux[1] and Windows[2]
implementations.

[1]: f50a40e889/pkg/system/meminfo_linux.go (L49)
[2]: f50a40e889/pkg/system/meminfo_windows.go (L40)

Signed-off-by: Nikolay Edigaryev <edigaryev@gmail.com>
2020-09-10 22:15:45 +03:00
Sebastiaan van Stijn
47b7c888ee
Merge pull request #41284 from akerouanton/service-ulimits
Support ulimits on Swarm services.
2020-07-30 20:08:41 +02:00
Albin Kerouanton
c76f380bea
Add ulimits support to services
Add Ulimits field to the ContainerSpec API type and wire it to Swarmkit.

This is related to #40639.

Signed-off-by: Albin Kerouanton <albin@akerouanton.name>
2020-07-29 02:09:06 +02:00
Sebastiaan van Stijn
51c7992928
API: add "prune" events
This patch adds a new "prune" event type to indicate that pruning of a resource
type completed.

This event-type can be used on systems that want to perform actions after
resources have been cleaned up. For example, Docker Desktop performs an fstrim
after resources are deleted (https://github.com/linuxkit/linuxkit/tree/v0.7/pkg/trim-after-delete).

While the current (remove, destroy) events can provide information on _most_
resources, there is currently no event triggered after the BuildKit build-cache
is cleaned.

Prune events have a `reclaimed` attribute, indicating the amount of space that
was reclaimed (in bytes). The attribute can be used, for example, to use as a
threshold for performing fstrim actions. Reclaimed space for `network` events
will always be 0, but the field is added to be consistent with prune events for
other resources.

To test this patch:

Create some resources:

    for i in foo bar baz; do \
        docker network create network_$i \
        && docker volume create volume_$i \
        && docker run -d --name container_$i -v volume_$i:/volume busybox sh -c 'truncate -s 5M somefile; truncate -s 5M /volume/file' \
        && docker tag busybox:latest image_$i; \
    done;

    docker pull alpine
    docker pull nginx:alpine

    echo -e "FROM busybox\nRUN truncate -s 50M bigfile" | DOCKER_BUILDKIT=1 docker build -

Start listening for "prune" events in another shell:

    docker events --filter event=prune

Prune containers, networks, volumes, and build-cache:

    docker system prune -af --volumes

See the events that are returned:

    docker events --filter event=prune
    2020-07-25T12:12:09.268491000Z container prune  (reclaimed=15728640)
    2020-07-25T12:12:09.447890400Z network prune  (reclaimed=0)
    2020-07-25T12:12:09.452323000Z volume prune  (reclaimed=15728640)
    2020-07-25T12:12:09.517236200Z image prune  (reclaimed=21568540)
    2020-07-25T12:12:09.566662600Z builder prune  (reclaimed=52428841)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-28 12:41:14 +02:00
Tibor Vass
846b7e24ba
Merge pull request #41254 from AkihiroSuda/deprecate-kernel-memory
Deprecate KernelMemory
2020-07-28 10:43:29 +02:00
Sebastiaan van Stijn
4750c28eea
Merge pull request #41236 from thaJeztah/move_version_to_definitions
Swagger: move system version response to definitions
2020-07-28 09:35:20 +02:00
Sebastiaan van Stijn
b36e87af03
Merge pull request #41249 from cpuguy83/swarm_caps
Replace swarm Capabilites API with cap add/drop API
2020-07-28 01:07:49 +02:00
Sebastiaan van Stijn
f2cc755f66
docs: API v1.39: move system version response to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-27 21:07:24 +02:00
Sebastiaan van Stijn
e221931ccd
docs: API v1.40: move system version response to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-27 21:03:39 +02:00
Brian Goff
4db39ab1a0
Merge pull request #41267 from thaJeztah/swagger_fix_buildcache_types 2020-07-27 12:02:53 -07:00
Brian Goff
24f173a003 Replace service "Capabilities" w/ add/drop API
After dicussing with maintainers, it was decided putting the burden of
providing the full cap list on the client is not a good design.
Instead we decided to follow along with the container API and use cap
add/drop.

This brings in the changes already merged into swarmkit.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-07-27 10:09:42 -07:00
Sebastiaan van Stijn
9a6402d761
docs: API v1.39: fix type for BuildCache CreatedAt and LastUsedAt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-27 12:13:27 +02:00
Sebastiaan van Stijn
a305abb1d1
docs: API v1.40: fix type for BuildCache CreatedAt and LastUsedAt
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-27 12:12:25 +02:00
Akihiro Suda
b8ca7de823
Deprecate KernelMemory
Kernel memory limit is not supported on cgroup v2.
Even on cgroup v1, kernel memory limit (`kmem.limit_in_bytes`) has been deprecated since kernel 5.4.
0158115f70

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-24 20:44:29 +09:00
Sebastiaan van Stijn
a8b2272ab3
swagger: sync updates to v1.39
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-23 13:52:51 +02:00
Sebastiaan van Stijn
1e89ca40ba
swagger: sync updates to v1.40
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-23 13:35:54 +02:00
Sebastiaan van Stijn
d4b3e786ed
docs: add mention of DefaultAddressPools to API history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 14:36:57 +02:00
Sebastiaan van Stijn
63382e5f3b
docs: sync API v1.39 swagger formatting with current version
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-03 20:32:51 +02:00
Sebastiaan van Stijn
01244e85e7
docs: sync API v1.40 swagger formatting with current version
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-03 15:42:41 +02:00
Sebastiaan van Stijn
687bdc7c71
API: swarm: move PidsLimit to TaskTemplate.Resources
The initial implementation followed the Swarm API, where
PidsLimit is located in ContainerSpec. This is not the
desired place for this property, so moving the field to
TaskTemplate.Resources in our API.

A similar change should be made in the SwarmKit API (likely
keeping the old field for backward compatibility, because
it was merged some releases back)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-05 12:50:38 +02:00