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

attach node name label in ip cr #2680

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

mingoooo
Copy link
Contributor

@mingoooo mingoooo commented Apr 20, 2023

What type of this PR

Features

Which issue(s) this PR fixes:

Fixes #2317

WHAT

🤖 Generated by Copilot at 3075070

This pull request adds node name label support to IP CRD objects for node IPAM feature. It also refactors the subnet name label logic to use a constant from the util package.

🤖 Generated by Copilot at 3075070

Node name label is the key to the gate
Unleash the power of the IP CRD fate
Subnet name logic is not enough
We need to label all the nodes and stuff

HOW

🤖 Generated by Copilot at 3075070

  • Add and set a new label for node name to IP CRD objects (link, link, link)
  • Define a constant for the label key in pkg/util/const.go (link)
  • Use the constant to add the label with the node name as the value in pkg/controller/node.go (link)
  • Update the existing logic of setting the subnet name label to also set the node name label in the same function in pkg/controller/node.go (link)

@github-actions
Copy link
Contributor

  • The commit message is missing. Please add a descriptive commit message that explains the changes made in this patch.
  • In the createOrUpdateCrdIPs function, the addition of util.NodeNameLabel to the labels map should be documented in the code with a comment explaining its purpose.
  • It is unclear from the code context what nodeName is and where it comes from. Please add a comment or documentation explaining its origin and usage.
  • In the const.go file, please group the constants together based on their functionality and add a comment explaining the purpose of each group of constants.

@oilbeater
Copy link
Collaborator

Thanks! @mingoooo

@oilbeater oilbeater merged commit 1d6a0fe into kubeovn:master Apr 20, 2023
@mingoooo
Copy link
Contributor Author

Thanks! @mingoooo

Happly to help and become a contributor 😉

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.

Add nodeName label for IP CR
2 participants