Commit Graph

21 Commits

Author SHA1 Message Date
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
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 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
Sebastiaan van Stijn 157c53c8e0
Add API support for PidsLimit on services
Support for PidsLimit was added to SwarmKit in docker/swarmkit/pull/2415,
but never exposed through the Docker remove API.

This patch exposes the feature in the repote API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-15 22:37:42 +02:00
Olli Janatuinen f787b235de Add support capabilities list on services
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
2019-05-28 19:52:36 +03:00
Sebastiaan van Stijn 20383d504b Add support for using Configs as CredentialSpecs in services
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-04 15:29:33 -06:00
Drew Erny 14da20f5e7 Add support for sysctl options in services
Adds support for sysctl options in docker services.

* Adds API plumbing for creating services with sysctl options set.
* Adds swagger.yaml documentation for new API field.
* Updates the API version history document.
* Changes executor package to make use of the Sysctls field on objects
* Includes integration test to verify that new behavior works.

Essentially, everything needed to support the equivalent of docker run's
`--sysctl` option except the CLI.

Includes a vendoring of swarmkit for proto changes to support the new
behavior.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2018-09-20 10:51:56 -05:00
Vincent Demeester e401b88e59
Add support for `init` on services
It's already supported by `swarmkit`, and act the same as
`HostConfig.Init` on container creation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-06-07 14:17:55 +02:00
Daniel Nephin 4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
Simon Ferquel f28cb422e6 Added support for swarm service isolation mode
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-10-30 16:16:18 +01:00
Aaron Lehmann 7728557687 Add config APIs
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-05-11 10:08:21 -07:00
Andrea Luzzardi 89a995a9d7 services: Add support for Credential Spec and SELinux
- Defined "normalized" type for Credential Spec and SELinux
- Added --credential-spec to docker service create & update
- SELinux is API only at the time

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2017-04-07 11:30:54 -07:00
Yong Tang c2d49ec214 Add `--stop-signal` for `service create` and `service update`
This fix tries to address the issue raised in 25696 where
it was not possible to specify `--stop-signal` for `docker service create`
and `docker service update`, in order to use special signal to stop
the container.

This fix adds `--stop-signal` and update the `StopSignal` in `Config`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 25696.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-21 15:19:45 -08:00
Yong Tang 499a0dd43e Add `--read-only` for `service create` and `service update`
This fix tries to address the issue raised in 29972 where
it was not possible to specify `--read-only` for `docker service create`
and `docker service update`, in order to have the container's root file
system to be read only.

This fix adds `--read-only` and update the `ReadonlyRootfs` in `HostConfig`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 29972.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-30 12:47:26 -08:00
Vincent Demeester 84450b72cd Add support for stdin_open in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:19:00 +01:00
Yong Tang ea9a23ccdb Add flag `--host` to `service create` and `--host-add/--host-rm` to `service update`
This fix tries to address 27902 by adding a flag `--host`
to `docker service create` and `--host-add/--host-rm` to
`docker service update`, so that it is possible to
specify extra `host:ip` settings in `/etc/hosts`.

This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it
is possible to specify extra hosts during service creation.

Related docs has been updated.

An integration test has been added.

This fix fixes 27902.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-10 10:20:24 -08:00
Evan Hazlett 3716ec25b4 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>
2016-11-09 14:27:43 -05:00
Yong Tang 9e8adbecf5 Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-08 15:41:32 -08:00
Nikolay Milovanov b222aa1a58 Adding the hostname option to docker service command
Signed-off-by: Nikolay Milovanov <nmil@itransformers.net>
2016-11-03 10:02:14 +00:00
Cezar Sa Espinola 7bd2611789
Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
2016-10-28 15:19:08 -02:00
Michael Crosby 91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00