-
Notifications
You must be signed in to change notification settings - Fork 44
feat: first capi v1beta2 api support #283
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
base: master
Are you sure you want to change the base?
Conversation
88bcdb8 to
3be05b0
Compare
|
Sorry, I unintentionally added those extra changes to go.mod. I have removed them. |
|
I didn't thank you for the efforts put in place to address
I guess you're talking about the retrieval of |
|
Besides the code base import, we also need to implement the required Control Plane contracts: |
No problem, Kamaji is a great project, glad I can contribute.
What happens now is if you start a new clusterapi project (like I did), by default you will get clusterapi v1.11.x, which can't use the current kamaji control plane provider because the provier is trying to read a v1beta1.Cluster object that isn't present. That hurts adoption for new users, but your point is valid for existing v1.10.x users that may try to upgrade the Kamaji provider. This is an interesting problem. I looked at the other control plane providers. None of them have moved to v1beta2 yet. I looked at the infra providers AWS, Openstack, metal3, which have moved to v1beta2. They apparently don't need to read clusterapi objects (unlike the control plane providers which apparently needs to get information from clusterapi.Cluster), so they don't have as much of a dependency on the clusterapi objects. So there's no precedent for how a control plane provider should implement backwards compatibility yet. Btw thanks for pointing out the control plane contracts, I missed that. I went through them, I'm not exactly sure what the right path forward is. It sounds like clusterapi v1.11 can support the old v1beta1 contracts, but I don't know if it's possible to maintain both contracts in Kamaji at the same time, allowing for a single Kamaji provider version to support both clusterapi versions. Otherwise I'd guess you'd need to maintain two branches. You might want to maintain two branches anyway, as metal3 does, even if it's just for stability purposes. If I have some time I will see if I can implement the v1beta2 contracts alongside the v1beta1 requirements. This would also require being able to support both v1beta1.Cluster and v1beta2.Cluster lookups. If it's possible that would be great, but otherwise I think you'd need to keep separate branches. Users on clusterapi v1.10.x would then need to specify the branch tag when installing the Kamaji control plane provider to get the compatible branch release. |
|
First, thanks a lot for delving into the discussion.
The main issue I see there is that we're going to query the API Server for CAPI Kubernetes is a fast-paced world, something that doesn't fit the enterprise world we're addressing as a company (CLASTIX), despite embracing the Open Source manifesto: tl;dr; we can't slow down development for the whole of adopters' base, if these can't upgrade to a higher CAPI version, they can engage with us in maintaing an updated for with CAPI Unless @bsctl has a different opinion, I would go all-in with the This means we're ready to get this merged as a starting point: there are still some missing contracts, but it's definitely a good starting point. |
Cluster-api v1.11 contains a CRD migrator that will automatically convert any existing v1beta1 CAPI object to v1beta2 automatically, so there's no need to worry about just querying for v1beta2 Cluster objects. We had the same worries and just tested this, here's a small log excerpt of machine objects being converted: |
|
@gainsley thanks for the further confirmation, even tho I'm more worried about the conditions for non-core CAPI objects. |
Hi, I made and tested these changes to update the kamaji control plane provider to use cluster api v1beta2 apis. Please see https://cluster-api.sigs.k8s.io/developer/providers/migrations/v1.10-to-v1.11#how-to-implement-the-new-v1beta2-contract.
I thought you may be interested in having them. They are pretty straightforward as functionally nothing has changed, it's just things have moved around or are accomplished slightly differently.
I have tested this with clusterapi v1.11.3 and metal3 v1.11.0. The changes to rbac are required for resolving object references (see above link).
These are obviously not backwards compatible for users of clusterapi v1.10 (v1beta1), if you take them I would suggest keeping separate release branches for clusterapi v1beta1 vs v1beta2, much like clusterapi does itself.