-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Moving packages not intended for external usage to internal #5455
Comments
/hold |
/hold cancel Overall +1 from the community with following notes
@CecileRobertMichon please confirm last point summarise your comment |
+1, also this is the kind of change that should definitely not go in a patch release (but I think we've agreed to bug fixes only so we should be good on that front) |
+1 |
1 similar comment
+1 |
/milestone v1.1 |
Let's make sure to look at the current API usage in the providers first before moving * to internal, we can go on a case-by-case basis |
/help I have kicked of this work with #5493 but there is definitely room for other people helping in this effort, which hopefully in most cases it is also more straight forward than the linked PR (move, adjust import without additional changes). |
@fabriziopandini: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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/test-infra repository. |
Below a first set of task that should be an easy go for new contributors The ask is to move controllers packages listed below to internal, then add on the original controllers package an alias.go file implementing a shim for reconcilers only, like the one in https://github.com/kubernetes-sigs/cluster-api/blob/main/bootstrap/kubeadm/controllers/alias.go
In order to coordinate and fast track PRs, please add a comment on this issue if you are picking up one of this tasks, then open a separated PR for each of them /good-first-issue |
@fabriziopandini: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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/test-infra repository. |
/assign |
/unassign |
I can pick up |
@fabriziopandini I would like to pick this one- |
@vibhorrawat Great! The idea is to add an alias.go like Fabrizio did for the kubeadm bootstrap controller in: https://github.com/kubernetes-sigs/cluster-api/pull/5493/files
Feel free to ask, if you have any other questions. |
Hi |
@fabriziopandini should we also review https://github.com/kubernetes-sigs/cluster-api/tree/main/util as part of this effort? |
@enxebre depends on what do you have in mind with review, but ideally yes if we find out some packages not used outside CAPI we can consider to move them to internal. Not sure if we can get there given that my main concern are controllers. |
@shivanshu1333 @vibhorrawat @kaitoii11 is there anything I can do to keep this effort moving? |
@fabriziopandini @killianmuldoon WDYT should we follow a similar pattern for the new webhooks package? Would be relatively easy to change right now. |
+1 for this where it makes sense. Even if there's nothing we're really exposing right now - I don't think there's much apart from the structs - it's good to have the pattern in place. |
@fabriziopandini Hey, I will publish the PR during this week. Question about how do I test it locally? Kindly suggest. Thank you. |
you can integration and unit tests with |
@fabriziopandini Hi there, just an update from my end, I'm ready with the required changes for - |
@vibhorrawat If you want, you can also open a WIP PR and CI will run all the tests for you. (just prefix the PR title with |
@sbueringer @fabriziopandini Submitted the PR for review with [WIP] prefix. Kindly have a look whenever convenient. Besides, I will continue my effort towards testing the code changes locally. |
If there aren't any takers, is it okay if I also work on |
@kaitoii11 Yup! |
/close |
@fabriziopandini: Closing this issue. In response to this:
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/test-infra repository. |
This is a follow up of #5440 (comment) and #5440 (comment) and
User Story
As a user I would like to be have a clear signal about what is is subject to version guarantees and what not
As a developer I would like to be able to continually evolving CAPI and add new feautures, with clear boundaries between what can change and what instead should respect version guarantees
Detailed Description
For historical reason (kubebuilder scaffolding, merge of CABPK/KCP/CAPD into a single repository, etc) CAPI public surface is wider than we really want to, and this could lead to use case like the one described in the comment above whit users starting to rely on things that we are not committed to support long term.
This cause frustration both in users and maintainers.
This issue is about starting a code reorg activity for moving packages not intended for external usage to internal, thus avoiding confusions for people importing Cluster API as a go library and provide cleaner boundaries to the maintainers.
Anything else you would like to add:
The operation is intended to non have impact (or to have minimal impact to the users), so the proposal is to gate decision on what can be moved to internal by an analysis of Cluster API usage as a library in following providers implemented outside of the Cluster API repository:
E.g for the bootstrap/kubeadm folder, following changes seems reasonable
bootstrap/kubeadm/controllers → bootstrap/kubeadm/internal/controllers (*)
bootstrap/kubeadm/types/upstreamv1beta2 → internal/kubeadm/types/upstreamv1beta2
bootstrap/kubeadm/types/upstreamv1beta3 → internal/kubeadm/types/upstreamv1beta3
(*) Even if we are moving the implementation detail of CABPK controllers to internal, it could make sense to provide a way for creating reconcilers, thus allowing users to combine CAPI controllers in a single binary if they want to.
/kind cleanup
/area code-organization
The text was updated successfully, but these errors were encountered: