-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 support for special IP designator host-gateway
in --add-hosts
.
#14392
Conversation
Signed-off-by: Will Temple <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: willmtemple The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Will Temple <[email protected]>
@@ -54,6 +54,9 @@ func ValidateExtraHost(val string) (string, error) { // nolint | |||
if len(arr) != 2 || len(arr[0]) == 0 { | |||
return "", fmt.Errorf("bad format for add-host: %q", val) | |||
} | |||
if (arr[1] == "host-gateway") { | |||
return val, nil | |||
} |
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.
Could you update the function comment please to cover this new case?
@Luap99 PTAL |
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.
This has to be fixed in the etchosts package instead of this workaround in libpod. Otherwise it will not work for podman build.
@Luap99 Do you think it's sufficient to just allow passing |
Yes that is what I had in mind. |
@willmtemple @Luap99 what is going on with this PR? |
A friendly reminder that this PR had no activity for 30 days. |
@Luap99 Update? |
A friendly reminder that this PR had no activity for 30 days. |
@willmtemple: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The PR looks abandoned. Please re-open when you find time to get back to it. |
Implements the behavior described in #14390 (feature request).
host-gateway
is a special designator used in the IP address position of--add-host
entries. It maps to the container'shost.containers.internal
IP address. moby-engine/docker CLI implement this same option.This implementation:
NetOptions.AddHosts
field).host.containers.internal
IP address duringetchosts
construction in the linux libpod container driver.Signed-off-by: Will Temple [email protected]
Closes #14390
Example:
Does this PR introduce a user-facing change?
Is this what your CI is expecting?