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

Problem supporting extra keys in pod network annotation #608

Open
SchSeba opened this issue Dec 31, 2018 · 3 comments
Open

Problem supporting extra keys in pod network annotation #608

SchSeba opened this issue Dec 31, 2018 · 3 comments

Comments

@SchSeba
Copy link
Contributor

SchSeba commented Dec 31, 2018

Problem supporting extra keys in pod network annotation

Acorrding to the de-facto standard documentation-
"All key names that do not include a period character are reserved to ensure this specification
may be extended in the future. Implementations that write keys other than those defined in this
specification must use reverse domain name notation (eg "​ org.foo.bar.key-name​ ") to
name the non-standard keys."

The problem is with the LoadArgs function

// LoadArgs parses args from a string in the form "K=V;K2=V2;..."
func LoadArgs(args string, container interface{}) error 

We find the keys by is name using this call keyField := GetKeyField(keyString, containerValue) but according to the de-facto standard documentation to define extra args with the name of "​ org.foo.bar.key-name​ " I need to have a variable called org.foo.bar.key-name and this is not possible.

I think we need to change the function of GetKeyField to read the json tag and not the variable name.

@dcbw
Copy link
Member

dcbw commented Jan 9, 2019

@SchSeba how do those pod annotations actually get into CNI args? I'm not aware of pod annotations being passed to CNI plugins in either dockershim or CRIO...

That said, if for some reason LoadArgs doesn't allow key names with "." then that should be fixed...

@SchSeba
Copy link
Contributor Author

SchSeba commented Jan 9, 2019

@dcbw Using this PR k8snetworkplumbingwg/multus-cni#210 ( I change it for now because of this issue)

@dcbw
Copy link
Member

dcbw commented Jan 10, 2019

@SchSeba Yeah, just found that PR independently. If you have a PR to fix the LoadArgs parsing, we'd entertain it :)

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

No branches or pull requests

2 participants