The option --dns and --net=host should not be mutually exclusive.#22408
Conversation
e2b5709 to
8b2e785
Compare
8b2e785 to
f384ba8
Compare
|
There seems to be some historical context that I may be missing when it comes to supporting |
|
Ping @mrjana: WDYT? |
|
+1 on the design. LGTM |
|
moving to code review. @yongtang this needs a rebase now, can you rebase? |
f384ba8 to
ce99698
Compare
|
Thanks @mrjana @icecrime @thaJeztah @mavenugo for the review. I rebased the Pull Request. Please let me know if there are any issues. |
There was a problem hiding this comment.
Is there a reason we wouldn't support --add-host and --dns-search as well?
|
@mavenugo I think the historical restriction was that in I agree with @cpuguy83 that if we are removing this restriction, then any option which modifies |
|
Thanks @estesp, and agreed on proper documentation as well (to prevent confusion) |
|
Thanks @cpuguy83 @estesp and @thaJeztah for the review and suggestions. I will update the PR to address the issues raised. |
ce99698 to
9a28f67
Compare
|
@thaJeztah @cpuguy83 @estesp @icecrime @mavenugo I updated the pull request so that now |
bb5533e to
3dab32c
Compare
|
LGTM |
1 similar comment
|
LGTM |
|
docs LGTM 👼 |
There was a problem hiding this comment.
Perhaps something like;
Similar to `--hostname`, the `--add-host`, `--dns`, `--dns-search`, and
`--dns-opt` options can be used in `host` network mode. These options update
`/etc/hosts` or `/etc/resolv.conf` inside the container. No change are made to
`/etc/hosts` and `/etc/resolv.conf` on the host.3dab32c to
f9a6214
Compare
|
Thanks @thaJeztah, the documentation has been updated. |
|
LGTM, thanks @yongtang |
|
oh, so sorry @yongtang, looks like it needs a rebase 😢 |
…e mutually exclusive. This fix tries to address the issue raised in moby#21976 and allows the options of `--dns`, `--dns-search`, `--dns-opt` and `--net=host` to work at the same time. The documentation has been updated and additional tests have been added to cover this change. This fix fixes moby#21976. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix tries to address the issue raised in moby#21976 and allows the options of `--add-host` and `--net=host` to work at the same time. The documentation has been updated and additional tests have been added to cover this change. This fix fixes moby#21976. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
f9a6214 to
90bd41a
Compare
|
Thanks @thaJeztah the PR has been rebased. |
|
TY, TY, TY, to all involved! |
Automatic merge from submit-queue Re-writing of the resolv.conf file generated by docker Fixes #17406 Docker 1.12 will contain feature "The option --dns and --net=host should not be mutually exclusive" (moby/moby#22408) This patch adds optional support for this ability in kubelet (for now in case of "hostNetwork: true" set all dns settings are ignored if any). To enable feature use newly added kubelet flag: --allow-dns-for-hostnet=true
- What I did
This fix tries to address the issue raised in #21976 and allows the options of
--add-host,--dns,--dns-search,--dns-optand--net=hostto work at the same time.- How I did it
The validation functions for options has been updated.
- How to verify it
The documentation has been updated and additional tests have been added to cover this change.
- Description for the changelog
Allows
--add-host,--dns,--dns-searchand--dns-optto be used with--net=hostat the same time when container runs.- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #21976.
Signed-off-by: Yong Tang yong.tang.github@outlook.com