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

Fix parsing CNI .conf and .json config formats #23629

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

gulducat
Copy link
Member

Our documentation states that we support .conf and .json config formats (which are the same, actually), but in reality only .conflist works properly. All of them are fingerprinted correctly, but only conflist works at allocation run time.

Fixes #19816

The first commit is here for a reference, which used a boolean to keep track of whether or not confIsList, but in my second pass I made a little struct to make it easier (I think) to hold correctly.

I have some e2e tests set up for this too, but I'll do that in a separate PR since we generally don't backport those.

@gulducat gulducat added backport/ent/1.6.x+ent Changes are backported to 1.6.x+ent backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/1.8.x backport to 1.8.x release line labels Jul 18, 2024
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Don't forget a changelog!

client/allocrunner/networking_cni_test.go Show resolved Hide resolved
so we can support more than just .conflist format
like our docs claim we do
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/ent/1.6.x+ent Changes are backported to 1.6.x+ent backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/1.8.x backport to 1.8.x release line theme/cni type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CNI .conf and .json configuration files not loaded properly - "no 'plugins' key"
3 participants