-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom DNS settings to service definition #27567
Conversation
d4d0b0f
to
ed32006
Compare
ping @aluzzardi @mrjana @dnephin PTAL |
ed32006
to
0de83b0
Compare
moby/moby#24391 about allowing custom DNS settings to service definition. This fix adds `DNSConfig` to service definition. This fix is related to the pull request: moby/moby#27567 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
0de83b0
to
a2fa5a7
Compare
moby/moby#24391 about allowing custom DNS settings to service definition. This fix adds `DNSConfig` to service definition. This fix is related to the pull request: moby/moby#27567 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix revendor swarmkit to 0ec7c6e. Related docker PR and issues: (moby#27567) (moby#25437) (moby#26988) (moby#25644) Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Design LGTM |
Moving this back to design review because the UX for the flags for |
// DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf) | ||
// Detailed documentation is available in: | ||
// http://man7.org/linux/man-pages/man5/resolv.conf.5.html | ||
// TODO: domain is not supported yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what's not supported yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thaJeztah resolv.conf
allows to specify domain
option:
http://man7.org/linux/man-pages/man5/resolv.conf.5.html
domain Local domain name.
I will update the PR to make domain
(not supported) explicit.
Discussing this; we probably want this on |
8df0912
to
8142785
Compare
Thanks all for the review. The PR has been updated with DNS flags for |
oh, needs a rebase already 😞 |
Thanks @aluzzardi @stevvooe @thaJeztah. The PR has been updated with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs LGTM
docs LGTM |
Thanks so much @yongtang! |
This fix is a follow up to moby#27567 based on: moby#27567 (comment) In moby#27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Pull request moby#27745 added support for the client to talk to older versions of the daemon. Various flags were added to docker 1.13 that are not compatible with older daemons. This PR adds annotations to those flags, so that they are automatically hidden if the daemon is older than docker 1.13 (API 1.25). Not all new flags affect the API (some are client-side only). The following PR's added new flags to docker 1.13 that affect the API; - moby#23430 added `--cpu-rt-period`and `--cpu-rt-runtime` - moby#27800 / moby#25317 added `--group` / `--group-add` / `--group-rm` - moby#27702 added `--network` to `docker build` - moby#25962 added `--attachable` to `docker network create` - moby#27998 added `--compose-file` to `docker stack deploy` - moby#22566 added `--stop-timeout` to `docker run` and `docker create` - moby#26061 added `--init` to `docker run` and `docker create` - moby#26941 added `--init-path` to `docker run` and `docker create` - moby#27958 added `--cpus` on `docker run` / `docker create` - moby#27567 added `--dns`, `--dns-opt`, and `--dns-search` to `docker service create` - moby#27596 added `--force` to `docker service update` - moby#27857 added `--hostname` to `docker service create` - moby#28031 added `--hosts`, `--host-add` / `--host-rm` to `docker service create` and `docker service update` - moby#28076 added `--tty` on `docker service create` / `docker service update` - moby#26421 added `--update-max-failure-ratio`, `--update-monitor` and `--rollback` on `docker service update` - moby#27369 added `--health-cmd`, `--health-interval`, `--health-retries`, `--health-timeout` and `--no-healthcheck` options to `docker service create` and `docker service update` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
using 1.13 for windows, for some reason the container doesn't try to send query to my host's dns now. It won't resolve my private network dns. |
Add custom DNS settings to service definition
This fix is a follow up to #27567 based on: moby/moby#27567 (comment) In #27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix is a follow up to #27567 based on: moby/moby#27567 (comment) In #27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: b38ca0f4c3024fb78e86c7a36bc6e624f4c60e18 Component: cli
Pull request moby/moby#27745 added support for the client to talk to older versions of the daemon. Various flags were added to docker 1.13 that are not compatible with older daemons. This PR adds annotations to those flags, so that they are automatically hidden if the daemon is older than docker 1.13 (API 1.25). Not all new flags affect the API (some are client-side only). The following PR's added new flags to docker 1.13 that affect the API; - moby/moby#23430 added `--cpu-rt-period`and `--cpu-rt-runtime` - moby/moby#27800 / moby/moby#25317 added `--group` / `--group-add` / `--group-rm` - moby/moby#27702 added `--network` to `docker build` - moby/moby#25962 added `--attachable` to `docker network create` - moby/moby#27998 added `--compose-file` to `docker stack deploy` - moby/moby#22566 added `--stop-timeout` to `docker run` and `docker create` - moby/moby#26061 added `--init` to `docker run` and `docker create` - moby/moby#26941 added `--init-path` to `docker run` and `docker create` - moby/moby#27958 added `--cpus` on `docker run` / `docker create` - moby/moby#27567 added `--dns`, `--dns-opt`, and `--dns-search` to `docker service create` - moby/moby#27596 added `--force` to `docker service update` - moby/moby#27857 added `--hostname` to `docker service create` - moby/moby#28031 added `--hosts`, `--host-add` / `--host-rm` to `docker service create` and `docker service update` - moby/moby#28076 added `--tty` on `docker service create` / `docker service update` - moby/moby#26421 added `--update-max-failure-ratio`, `--update-monitor` and `--rollback` on `docker service update` - moby/moby#27369 added `--health-cmd`, `--health-interval`, `--health-retries`, `--health-timeout` and `--no-healthcheck` options to `docker service create` and `docker service update` Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 5d2722f83db9e301c6dcbe1c562c2051a52905db Component: cli
This fix is based on the comment in moby/moby#27567 (comment) Basically, in the help output of `docker service update`, the `--xxx-add` flags typically have plural forms while `--xxx-rm` flags have singular forms. This fix updates the help output for consistency. This fix also updates the related docs in `service_update.md`. The help output in `service_update.md` has been quite out-of-sync with the actual output so this fix replaces the output with the most up-to-date output. This fix is related to #27567. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: e2f650360918aa0573dac59598a92aa2e1cd5887 Component: cli
This fix is a follow up to #27567 based on: moby/moby#27567 (comment) In #27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: ebacbb50aec7281467daf59980ccb6d81724c050 Component: cli
This fix is based on the comment in moby/moby#27567 (comment) Basically, in the help output of `docker service update`, the `--xxx-add` flags typically have plural forms while `--xxx-rm` flags have singular forms. This fix updates the help output for consistency. This fix also updates the related docs in `service_update.md`. The help output in `service_update.md` has been quite out-of-sync with the actual output so this fix replaces the output with the most up-to-date output. This fix is related to #27567. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix is a follow up to #27567 based on: moby/moby#27567 (comment) In #27567, `--dns-options` has been added to `service create/update`, together with `--dns` and `--dns-search`. The `--dns-opt` was used in `docker run`. This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide `--dns-opt`. It is still possible to use `--dns-opt` with `docker run/create`, though it will not show up in help output. This fix change `--dns-options`to --dns-option` for `docker service create` and `docker service update`. This fix also updates the docs and bash/zsh completion scripts. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
- What I did
This fix tries to fix the issue raised in #24391 about allowing custom DNS settings to service definition.
- How I did it
This fix adds
DNS
,DNSOptions
,DNSSearch
to service definition, as well as--dns
,--dns-opt
, and--dns-search
toservice create
.- How to verify it
An integration test has been added to cover the changes in this fix.
- Description for the changelog
Add
--dns
,--dns-opt
, anddns-search
toservice create
.- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #24391.
NOTE: A PR in swarmkit has been created separately:
moby/swarmkit#1681