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

Network defaults are duplicated, remove one #8523

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

manuelbuil
Copy link
Contributor

@manuelbuil manuelbuil commented Oct 3, 2023

Proposed Changes

We are already setting the default networking values:

  • clusterCIDR := "10.42.0.0/16" or "fd00:42::/56"
  • serviceCIDR := "10.43.0.0/16" or "fd00:43::/112"
  • DNS: "utilsnet.GetIndexedIP(svcCIDR, 10)"

in func run of pkg/cli/server/server.go. When the execution reaches pkg/daemons/control/server.go and executes "defaults", the code that sets the default networking values is never executed because those variables already have a value. Moreover, the latter defaults don't include dual-stack and the DNS address is hardcoded to 10.43.0.10, regardless of the defined serviceCIDR.

Conclusion: remove that part of the code which is currently useless

Types of Changes

Code refactor

Verification

Code refactor. Can't be verified

Testing

Code refactor. Can't be verified

Linked Issues

#8522

User-Facing Change


Further Comments

Signed-off-by: Manuel Buil <mbuil@suse.com>
@manuelbuil manuelbuil requested a review from a team as a code owner October 3, 2023 07:48
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (00fc5a2) 19.71% compared to head (e82b376) 51.59%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #8523       +/-   ##
===========================================
+ Coverage   19.71%   51.59%   +31.87%     
===========================================
  Files          84      143       +59     
  Lines        7840    14806     +6966     
===========================================
+ Hits         1546     7639     +6093     
+ Misses       6059     5963       -96     
- Partials      235     1204      +969     
Flag Coverage Δ
e2etests 48.84% <ø> (?)
inttests 44.51% <ø> (?)
unittests 19.71% <ø> (ø)

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

Files Coverage Δ
pkg/daemons/control/server.go 77.19% <ø> (ø)

... and 118 files with indirect coverage changes

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

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.

3 participants