Skip to content

Consider using remote.NodeProviderIDIndex in MachinePool controller #8856

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

Closed
killianmuldoon opened this issue Jun 14, 2023 · 8 comments
Closed
Labels
area/machinepool Issues or PRs related to machinepools help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@killianmuldoon
Copy link
Contributor

The MachinePool controller currently looks for specific node references by first looping through all of the nodes in the cluster and then checking to see if the ProviderID is among those listed on the MachinePool object.
This could be made more efficient by using the remote.NodeProviderIDIndex which is how the Machine controller currently looks up nodes by provider ID.

Doing this would require refactoring the code in the MachinePool controller's getNodeReferences:

func (r *MachinePoolReconciler) getNodeReferences(ctx context.Context, c client.Client, providerIDList []string) (getNodeReferencesResult, error) {

To look more like the Machine controller implementation and use index.NodeProviderIDField

func (r *Reconciler) getNode(ctx context.Context, c client.Reader, providerID string) (*corev1.Node, error) {

/help-wanted
/area machinepool

@k8s-ci-robot k8s-ci-robot added area/machinepool Issues or PRs related to machinepools needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 14, 2023
@killianmuldoon
Copy link
Contributor Author

/help wanted

@fabriziopandini
Copy link
Member

/triage accepted
cc @Jont828 since he is working on MachinePools

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 14, 2023
@Jont828
Copy link
Contributor

Jont828 commented Jul 21, 2023

That seems reasonable. I'll take a look once I'm wrapped up with the DockerMachinePool Machines implementation.

@fabriziopandini
Copy link
Member

/kind cleanup
/priority important-longterm

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Apr 11, 2024
@fabriziopandini fabriziopandini added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label May 6, 2024
@cahillsf
Copy link
Member

cahillsf commented Aug 26, 2024

opened a PR for this, per @sbueringer closing this as "won't do"

#11071 (comment)

/close

@k8s-ci-robot
Copy link
Contributor

@cahillsf: Closing this issue.

In response to this:

opened a PR for this, per @sbueringer closing this as "won't do"

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@sbueringer
Copy link
Member

Thx for working on this! Sorry should have realized this earlier :)

@cahillsf
Copy link
Member

Thx for working on this! Sorry should have realized this earlier :)

np 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/machinepool Issues or PRs related to machinepools help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants