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

✨ [CABPK] Support using kubeadm v1beta2 types internally #4292

Conversation

fabriziopandini
Copy link
Member

@fabriziopandini fabriziopandini commented Mar 11, 2021

What this PR does / why we need it:
backport of #4227

This PR implements a stop-gap solution for kubeadm types removal explicitly designed for back-porting on the v1alpha3 branch.

The solution implemented is described in the #4170 (and more specifically this is alternative 2 for v1alpha3).

A proper conversion mechanism is going to be implemented in v1alpha4 only (also described in the proposal).

Which issue(s) this PR fixes:
Fixes #

/milestone v0.3.x

@k8s-ci-robot k8s-ci-robot added this to the v0.3.x milestone Mar 11, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 11, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 11, 2021
switch {
case semVersion.LessThan(versionutil.MustParseSemantic("v1.13.0")):
return schema.GroupVersion{}, errors.New("the bootstrap provider for kubeadm doesn't support Kubernetes version lower than v1.13.0")
case semVersion.LessThan(versionutil.MustParseSemantic("v1.15.0")):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off topic:

  • where can one find the minimum supported version of CAPBK in docs or YAML?
  • does CABK error out if the user version is older than the minimum?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see https://cluster-api.sigs.k8s.io/reference/versions.html
With this change CABPK will error out for Kubernetes < v1.13, while before things were failing in the cloud init script (which is much more complex to debug).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move the checks above to a validation webhook?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will open an issue to discuss this improvement.
The problem here is that this is a CABPK limitation, but the version could be defined on another resource (e.g. Machine deployments)

For the sake of this PR this is a little bit out of topic and this will also deviate from the original PR we are back porting.
Nevertheless we are already improving the status quo, so I hop this should not be a blocker

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rif #4321

@vincepri
Copy link
Member

/retitle ✨ [CABPK] Support using kubeadm v1beta2 types

@k8s-ci-robot k8s-ci-robot changed the title ⚠️ Kubeadm types stop gap ✨ [CABPK] Support using kubeadm v1beta2 types Mar 13, 2021
@vincepri vincepri changed the title ✨ [CABPK] Support using kubeadm v1beta2 types ✨ [CABPK] Support using kubeadm v1beta2 types internally Mar 13, 2021
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@CecileRobertMichon over to you

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2021
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2021
@fabriziopandini
Copy link
Member Author

/test pull-cluster-api-test-release-0-3

@k8s-ci-robot k8s-ci-robot merged commit 226d998 into kubernetes-sigs:release-0.3 Mar 17, 2021
@fabriziopandini fabriziopandini deleted the kubeadm-types-stop-gap branch March 23, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants