-
Notifications
You must be signed in to change notification settings - Fork 108
✨ Expose internal controllers #826
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
✨ Expose internal controllers #826
Conversation
This change adds existing internal controller implementations into the `controller/alias.go` file. This is an initial step towards addressing issue kubernetes-sigs#798, which aims to provide a public API for CAPI Operator providers. The current controller implementation is internal, and this change is a step towards organizing the internal structure, potentially in preparation for exposing parts of it or providing extension points for custom providers. Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
✅ Deploy Preview for kubernetes-sigs-cluster-api-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Introduce a custom `Result` type for reconciliation phases to provide more granular control over the reconciliation flow, including a `Completed` flag. Update phase functions and the phase runner to use the new `*Result` return type instead of `ctrl.Result`. This allows phases to signal completion explicitly, improving the logic for handling sequential phases. Modify the generic provider controller and related components (manifests downloader, phases) to align with the new `Result` type and phase function signatures. Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
Implement a phase-based framework for reconciling generic providers. This refactors the main reconciliation loop into a sequence of distinct, ordered phases (e.g., download, install, delete). Introduce `PhaseFn` and `phaseReconciler` types to manage phase execution. Move existing reconciliation logic into dedicated phase functions. Update the external `controller` package to epose aliases pointing to the refactored internal types for external import. Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
enable it for all non core provider types (Infrastructure, Bootstrap, ControlPlane, Addon, IPAM, RuntimeExtension). Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
4597b2d
to
75426a2
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demicev The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
3b07f31
to
0fe1d45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: 068beb75a84081ed77bdced6545d16cd8f79b540
|
What this PR does / why we need it:
This PR refactors the generic provider reconciliation logic to expose internal controllers and phases through the
controller/alias.go
file. This change allows external users to construct and interact with the core controller logic outside the operator pod.Result
type to avoid controller-runtime dependency on import.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #798