-
Notifications
You must be signed in to change notification settings - Fork 73
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 PodUID to the OVSDB #311
Add PodUID to the OVSDB #311
Conversation
Hi @jiayoukun. Thanks for your PR. I'm waiting for a k8snetworkplumbingwg member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
fix #309 |
OvnPort cnitypes.UnmarshallableString `json:"ovnPort,omitempty"` | ||
MAC cnitypes.UnmarshallableString `json:"mac,omitempty"` | ||
OvnPort cnitypes.UnmarshallableString `json:"ovnPort,omitempty"` | ||
K8S_POD_UID cnitypes.UnmarshallableString |
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.
there is no assurance runtime will provide this value (altohugh for k8s we do get this information passed down by the runtime)
so in case this arg is not provided should we store an empty value ? or just avoid adding this key to external-ids ?
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.
While I do not believe it is critical, I would prefer not to have an empty value inside the external_id
section of the port. Ideally, the field should be added conditionally only if the runtime provides a value for it.
.idea/.gitignore
Outdated
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 remove .idea
folder from the commit?
CC @SchSeba |
@SchSeba Can you confirm the code for me? |
Looks like this PR can help me as well, any progress on this one? |
I achieved my goal by modifying the code through PR, but it seems that no one in the current community maintains it. |
@phoracek Hope PR can help everyone :) |
@ykulazhenkov maybe you can help with that? @jiayoukun the only thing that i can suggest is to add a test, you can get a reference from the PR that i closed, #339 should be simple enough. |
@jiayoukun Thanks for the PR. Please share your thoughts about #311 (comment). To make CI happy, you need to change the description of the PR according to the PR template https://github.com/k8snetworkplumbingwg/ovs-cni/blob/main/.github/PULL_REQUEST_TEMPLATE.md. To make the DCO check pass for your PR, you need to sign off your commit with |
902fdf1
to
dcdf98f
Compare
The modification has been completed, thank you for your guidance. :) |
Thanks for the PR and the reviews too. @ykulazhenkov wanted to ask you, would you please own the review of this PR? If you trust and like the code, I'd be happy to merge this |
/retest |
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 tested the PR and it works as expected. LGTM
@jiayoukun can you updated PR description to include release note? (check the PR template for details). I think this change should be reflected in the changelog.
@AlonaKaplan Is that right? I have made the changes, please help me confirm. |
copy content of the block below as is to you PR description:
|
**What this PR does / why we need it**: By adding the UID of a Pod to the external_ids field of the corresponding veth interface in the OVSDB, it becomes convenient for the Pod object to query the OVSDB using the UID to find the vethName of the Pod on the host machine, and then deliver OVS flow tables accordingly. Currently, the host machine's veth interface in the OVSDB only stores the Netns field, which is useful, but for Pod objects, their netns is not publicly accessible. This change addresses this limitation by allowing Pod objects to query the OVSDB directly using their UID. **Special notes for your reviewer**: **Release note**: ```release-note Added the Pod UID to the external_ids field of the corresponding veth interface in the OVSDB. This change allows querying the vethName of a Pod on the host machine using its UID, improving the ability to deliver OVS flow tables for Pod objects. ``` Signed-off-by: jiayoukun <[email protected]>
dcdf98f
to
59f9ad5
Compare
Thanks! : ) |
/retest |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiayoukun, phoracek, ykulazhenkov 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 |
What this PR does / why we need it:
By adding the UID of a Pod to the external_ids field of the corresponding veth interface in the OVSDB, it becomes convenient for the Pod object to query the OVSDB using the UID to find the vethName of the Pod on the host machine, and then deliver OVS flow tables accordingly.
Currently, the host machine's veth interface in the OVSDB only stores the Netns field, which is useful, but for Pod objects, their netns is not publicly accessible. This change addresses this limitation by allowing Pod objects to query the OVSDB directly using their UID.
Special notes for your reviewer:
Release note: