Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Select ipv4 first if there is one.#803

Merged
Random-Liu merged 1 commit intocontainerd:masterfrom
Random-Liu:select-ipv4-first
Jun 5, 2018
Merged

Select ipv4 first if there is one.#803
Random-Liu merged 1 commit intocontainerd:masterfrom
Random-Liu:select-ipv4-first

Conversation

@Random-Liu
Copy link
Copy Markdown
Member

@Random-Liu Random-Liu commented Jun 5, 2018

Fixes #783.

Select ipv4 address if there is one.
The expected behavior is not clearly defined in Kubernetes, but this is the implementation for all existing kubernetes network plugins. https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/network/plugins.go#L251

Signed-off-by: Lantao Liu lantaol@google.com

Signed-off-by: Lantao Liu <lantaol@google.com>
@Random-Liu Random-Liu added this to the v1.11 milestone Jun 5, 2018
Copy link
Copy Markdown
Member

@abhi abhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/LGTM

return portMappings
}

// selectPodIP select an ip from the ip list. It prefers ipv4 more than ipv6.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that works

@Random-Liu
Copy link
Copy Markdown
Member Author

@mikebrow @abhi Thanks for reviewing! Will merge after test passes.

@Random-Liu Random-Liu merged commit db028fd into containerd:master Jun 5, 2018
@Random-Liu Random-Liu deleted the select-ipv4-first branch June 5, 2018 19:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants