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

Fixed windows CNI setup in case cni none is configured #6820

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

rbrtbnfgl
Copy link
Contributor

Proposed Changes

Check if the cni configured is none before doing the setup on windows to fix the panic error. (#6768)

Types of Changes

Verification

Testing

Linked Issues

#6819

User-Facing Change


Further Comments

@rbrtbnfgl rbrtbnfgl requested a review from a team as a code owner September 13, 2024 09:07
@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.11%. Comparing base (5d229c9) to head (654130d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6820   +/-   ##
=======================================
  Coverage   25.11%   25.11%           
=======================================
  Files          33       33           
  Lines        2839     2839           
=======================================
  Hits          713      713           
  Misses       2079     2079           
  Partials       47       47           
Flag Coverage Δ
inttests 9.54% <ø> (ø)
unittests 17.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@brandond brandond left a comment

Choose a reason for hiding this comment

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

This is just below another block that is switching on CNIName, adding another if statement checking its value feels wrong.

Just move the p.KubeConfigKubeProxy = nodeConfig.AgentConfig.KubeConfigKubeProxy line above restConfig, err := ..., and add a return nil to the CNINone case.

@rbrtbnfgl
Copy link
Contributor Author

rbrtbnfgl commented Sep 16, 2024

I didn't want to change the code too much but logically you're right. Initially the Setup was inside the switch case for calico but when flannel was added it was moved outside without considering the possible fail with cni: none

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.

6 participants