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

delete check for existing ip cr #3361

Merged
merged 1 commit into from
Nov 6, 2023
Merged

delete check for existing ip cr #3361

merged 1 commit into from
Nov 6, 2023

Conversation

hongzhen-ma
Copy link
Collaborator

@hongzhen-ma hongzhen-ma commented Nov 1, 2023

What type of this PR

  • Bug fixes

Which issue(s) this PR fixes:

Fixes #3360

WHAT

🤖 Generated by Copilot at b065572

This pull request simplifies and refactors the IP address management code in pkg/controller. It removes unused or redundant parameters and variables, and improves the readability and consistency of the createOrUpdateCrdIPs function.

🤖 Generated by Copilot at b065572

Sing, O Muse, of the skillful code reviewers
Who scanned the changes with keen eyes and minds
And found the needless ipCR parameters
That cluttered the function calls like weeds.

HOW

🤖 Generated by Copilot at b065572

  • Simplify the createOrUpdateCrdIPs function by removing the ipCR and existingCR parameters, which are always nil or unused in most cases (link, link, link, link, link)
  • Move the createOrUpdateCrdIPs function from node.go to init.go, where it belongs with the common functions and constants for the controller package (link)
  • Remove the unnecessary creation of a map of IPs in the InitIPAM function, which is used to initialize the IP address management for pods and nodes, and use the lister directly instead (link)

@oilbeater oilbeater requested a review from zhangzujian November 2, 2023 03:13
@hongzhen-ma hongzhen-ma merged commit cc1f6ad into master Nov 6, 2023
59 checks passed
@hongzhen-ma hongzhen-ma deleted the ip-crd branch November 6, 2023 07:20
hongzhen-ma added a commit that referenced this pull request Nov 6, 2023
hongzhen-ma added a commit that referenced this pull request Nov 6, 2023
zbb88888 pushed a commit that referenced this pull request Nov 6, 2023
hongzhen-ma added a commit that referenced this pull request Nov 6, 2023
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.

The ip cr does not be deleted with release-1.9 version image
2 participants