-
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 pods created by play kube to a default network #16029
Add pods created by play kube to a default network #16029
Conversation
@Luap99 @mheon @umohnani8 WDYT Should we take down the network, when all pods/containers are removed? |
I see no reason to remove it. Overall this feels like a good change. I would like to see it documented in the manpages, though. |
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.
I don't think we should remopve this network, implementing this without TOCTOU race would require us to lock almost everything which can lead to performance problems.
Please add a test for this and remove [NO NEW TEST NEEDED]
from your commit. This is only intended for things that cannot be tested in CI.
cca3364
to
fb8c1c6
Compare
Changes LGTM |
fb8c1c6
to
db4a8a7
Compare
In order to allow pods to reach other pods (as in Kubernetes) they all need to be added to the same network. A network is created (if it doesn't exist) and pods created by play-kube are added to that network. When network options are passed to kube command the pods are not attached to the default kube network. Signed-off-by: Andrei Natanael Cosma <[email protected]>
6589e6a
to
f250560
Compare
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.
LGTM
@mheon Do you want to include this in v4.3 or wait for v4.4?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrei-n-cosma, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Just wondering if there's any documentation around how to access a container in another pod from the current pod in terms of host names? |
The pod name is the hostname. No domain name should be necessary, appropriate search domains are set to ensure that. |
Excellent :) Yes I figured that out with a bit of trial and error. It's very elegant, well done! |
In order to allow pods to reach other pods (as in Kubernetes) they all need to be added to the same network. A network is created (if it doesn't exist) and pods created by play-kube are added to that network. When network options are passed to kube command the pods are not attached to the default kube network.
Signed-off-by: Andrei Natanael Cosma [email protected]
Does this PR introduce a user-facing change?
It partially overlaps with #12965