-
Notifications
You must be signed in to change notification settings - Fork 37
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
Accont for non-sandbox interfaces when specifying the default network #71
Merged
dougbtv
merged 1 commit into
k8snetworkplumbingwg:master
from
maiqueb:account-for-sandbox-ifaces-when-choosing-default
Sep 13, 2024
Merged
Accont for non-sandbox interfaces when specifying the default network #71
dougbtv
merged 1 commit into
k8snetworkplumbingwg:master
from
maiqueb:account-for-sandbox-ifaces-when-choosing-default
Sep 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We only account for the sandox interfaces when reporting the interfaces in the network-status annotation; in case the `CreateNetworkStatuses` clients invoke it with a CNI result featuring non-sandbox interfaces *before*, the existing criteria would not work, and we would fail to report **any** inteface as the default one. Signed-off-by: Miguel Duarte Barroso <[email protected]>
/cc @dougbtv |
This was referenced Sep 13, 2024
dougbtv
approved these changes
Sep 13, 2024
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.
great catch, thank you!!!!
RamLavi
pushed a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 16, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Signed-off-by: Ram Lavi <[email protected]>
RamLavi
pushed a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 16, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Signed-off-by: Ram Lavi <[email protected]>
RamLavi
pushed a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 17, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Signed-off-by: Ram Lavi <[email protected]>
RamLavi
pushed a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 17, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Signed-off-by: Ram Lavi <[email protected]>
RamLavi
added a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 17, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
RamLavi
added a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 17, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
RamLavi
added a commit
to RamLavi/ovn-kubernetes
that referenced
this pull request
Sep 17, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
jcaamano
pushed a commit
to ovn-kubernetes/ovn-kubernetes
that referenced
this pull request
Sep 18, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
zeeke
pushed a commit
to zeeke/ovn-kubernetes-us
that referenced
this pull request
Oct 22, 2024
Before this commit, this was the network status we reported for a UDN pod: ``` kubectl get pods pod -ojsonpath="{@.metadata.annotations.k8s\.v1\.cni\.cncf\.io\/network-status}" | jq [ { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.9", "fd00:10:244:2::9" ], "mac": "0a:58:0a:f4:01:09", "default": true, "dns": {} } ] ``` With it, we now report: ``` [ { "name": "ovn-kubernetes", "interface": "ovn-udn1", "ips": [ "10.128.0.3" ], "mac": "0a:58:0a:80:00:03", "default": true, "dns": {} }, { "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.244.1.6", "fd00:10:244:2::6" ], "mac": "0a:58:0a:f4:01:06", "default": false, "dns": {} } ] ``` This way, applications complying to the k8snetworkplumbingwg de-facto standard can be aware of the UDN interface information. We report the primary UDN first so the network-attachment-definition-client can identify which of the 2 interfaces to report as primary [0]. [0] k8snetworkplumbingwg/network-attachment-definition-client#71 Signed-off-by: Miguel Duarte Barroso <[email protected]> Co-authored-by: Ram Lavi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We only account for the sandox interfaces when reporting the interfaces in the network-status annotation; in case the
CreateNetworkStatuses
clients invoke it with a CNI result featuring non-sandbox interfaces as the first item in the list, the existing criteria would not work, and we would fail to report any interface as the default.