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

Refactor Machine Type detection logic out of the reconcile function. #172

Open
Tracked by #174
VanillaSpoon opened this issue Nov 8, 2023 · 0 comments
Open
Tracked by #174

Comments

@VanillaSpoon
Copy link
Contributor

WHY

The current implementation of Instascale includes logic within the Reconcile function to check and set the machine type and verify if Hypershift is enabled. This logic is placed in the reconciliation loop because the client is not able to perform calls to the Kubernetes API until after the controller's SetupWithManager method has completed. As a result, fetching the ocmClusterId and checking if Hypershift is enabled cannot be done during setup.

The machineCheck is a crucial part of the controller setup, as it dictates the behaviour of the reconciliation process by determining whether we are working with a MachinePool, or NodePool. Performing this operation in the reconcile function is not optimal.

DONE

The machine type and Hypershift checks should be refactored out of the Reconcile loop to improve the controller's efficiency and code maintainability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant