Skip to content
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

Change Validation of interface name #1243

Merged

Conversation

adrianchiris
Copy link
Contributor

interface name should not be limited to DNS-1123 label format. instead validate interface name if provided in pod network annotation in a similar manner as iproute2[1].

this will allow to request interface names such as: "uplink_p0"

[1]https://github.com/iproute2/iproute2/blob/11740815bfe69d6ee2cad7c608a8edc70147209a/lib/utils.c#L832

interface name should not be limited to DNS-1123 label format.
instead validate interface name if provided in pod network annotation
in a similar manner as iproute2[1].

this will allow to request interface names such as: "uplink_p0"

[1]https://github.com/iproute2/iproute2/blob/11740815bfe69d6ee2cad7c608a8edc70147209a/lib/utils.c#L832

Signed-off-by: adrianc <[email protected]>
@coveralls
Copy link

Coverage Status

coverage: 62.829% (+0.05%) from 62.778%
when pulling d625d48 on adrianchiris:allow_undersocre_in_ifname
into 0fd3fa7 on k8snetworkplumbingwg:master.

@dougbtv
Copy link
Member

dougbtv commented Mar 28, 2024

Hey Adrian -- this one is bigger than a breadbox :) Would you mind joining the NPWG or Multus maintainer's call to chat us about it?

I think there's some subtlety here between "attachment name" and "interface name" and the nuance there in the spec as well, we should chat it out. Thanks!

@adrianchiris
Copy link
Contributor Author

sure, will raise it in one of the meetings. ATM on PTO (paternity leave) so will bring it up once im back. (~3 weeks )

@dougbtv
Copy link
Member

dougbtv commented Apr 25, 2024

I think my readthrough was wrong, and that this is totally reasonable given teh spec:

4.1.2.1.5 "interface"
This optional key with value of type string requires the implementation to use the given name for the pod interface resulting from this network attachment. This key’s value must be a valid Linux kernel interface name.

@killianmuldoon
Copy link

@Eoghan1232 - wondering if I could get your eyes on this one

@Eoghan1232
Copy link
Collaborator

lgtm - apologies I have been away for some time and only back now.

@killianmuldoon
Copy link

@adrianchiris @dougbtv WDYT about merging this one?

@dougbtv
Copy link
Member

dougbtv commented May 23, 2024

thanks for the submission, after considerable discussion: we couldn't find a reason why underscores would be invalid

@dougbtv dougbtv merged commit d9f1c7c into k8snetworkplumbingwg:master May 23, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants