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

kubeadm: add a new output/v1alpha2 API; deprecate output/v1alpha1 #105295

Merged
merged 7 commits into from Nov 8, 2021

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 27, 2021

What this PR does / why we need it:

The output/v1alpha2 API is a copy of output/v1alpha1 with a minor difference
where output/v1alpha2.BootstrapToken embeds
bootstraptoken/v1.BootstrapToken instead of
kubeadm/v1beta2.BootstrapToken.

Embedding the later is an undesired binding between the "kubeadm"
and "output" groups, preventing the eventual deprecation and removal
of the kubeadm/v1beta2 API.

This new output API version, unlike v1alpha1, does not include
defaulting which is not needed.

Which issue(s) this PR fixes:

xref kubernetes/kubeadm#2427

Special notes for your reviewer:

NONE

Does this PR introduce a user-facing change?

kubeadm: add a new output/v1alpha2 API that is identical to the output/v1alpha1, but attempts to resolve some internal dependencies with the kubeadm/v1beta2 API. The output/v1alpha1 API is now deprecated and will be removed in a future release.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Sep 27, 2021
@neolit123
Copy link
Member Author

/kind cleanup feature deprecation
/priority important-longterm
/triage accepted

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/feature Categorizes issue or PR as related to a new feature. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 27, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123

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 Sep 27, 2021
@neolit123
Copy link
Member Author

/retest

@neolit123 neolit123 changed the title WIP kubeadm: add a new output.v1alpha2 API WIP kubeadm: add a new output.v1alpha2 API; deprecate output.v1alpha1 Sep 27, 2021
@neolit123 neolit123 changed the title WIP kubeadm: add a new output.v1alpha2 API; deprecate output.v1alpha1 WIP kubeadm: add a new output/v1alpha2 API; deprecate output/v1alpha1 Sep 27, 2021
@neolit123
Copy link
Member Author

/milestone v1.23

@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 27, 2021
The API is a copy of output/v1alpha1 with a minor difference
where output/v1alpha2.BootstrapToken embeds
bootstraptoken/v1.BootstrapToken instead of
kubeadm/v1beta2.BootstrapToken.

Embedding the later is an undesired binding between the "kubeadm"
and "output" groups, preventing the eventual deprecation and removal
of the kubeadm.v1beta2 API.

This new output API version, unlike v1alpha1, does not include
defaulting which is not needed.
Use the new API for "config images list" and
"token list".
@neolit123 neolit123 changed the title WIP kubeadm: add a new output/v1alpha2 API; deprecate output/v1alpha1 kubeadm: add a new output/v1alpha2 API; deprecate output/v1alpha1 Sep 28, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 28, 2021
@neolit123
Copy link
Member Author

/hold for review

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 28, 2021
@varshaprasad96
Copy link
Contributor

Hello @neolit123 👋🏽
K8s 1.23 bug triage shadow here. Looks like there hasn't been any activity on this PR for a couple of days. Just wanted to check in to see if this is in track for k8s 1.23 release?

@neolit123
Copy link
Member Author

neolit123 commented Oct 26, 2021 via email

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

two small nits, otherwise lgtm

Comment on lines 32 to 33
// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api.
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
Copy link
Member

Choose a reason for hiding this comment

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

Does this TODO still apply? Are we expected to make changes in k8s.io/api?

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 don't think so. changes there are hard to argue about, thus i can just remove this TODO.

Copy link
Member Author

@neolit123 neolit123 Nov 3, 2021

Choose a reason for hiding this comment

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

added separate commit kubeadm: remove TODO about moving SchemeBuilder to k8s.io/api for that. also cleaned up this TODO from other API versions.
(i prefer if we keep the commit set here instead of squashing)

@@ -64,3 +67,14 @@ func Convert_v1beta2_JoinConfiguration_To_kubeadm_JoinConfiguration(in *JoinConf
out.NodeRegistration.ImagePullPolicy = corev1.PullIfNotPresent
return nil
}

// Convert_v1beta2_BootstrapToken_To_v1_BootstrapToken is required so that
Copy link
Member

Choose a reason for hiding this comment

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

Comment seems truncated

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed, now i need to remember what it was about.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated.

The addition of output/v1alpha2 made the converter-gen require
an explicit converter for:
kubeadm/v1beta2.BootstrapToken -> bootstraptoken/v1.BootstrapToken.

Add this converter under kubeadm/v1beta.
Use the converter in output/v1alpha1.
This TODO is no longer in scope, thus remove it from
all register.go files under /app/apis.
@fabriziopandini
Copy link
Member

/lgtm
@neolit123 feel free to un hold

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 8, 2021
@neolit123
Copy link
Member Author

neolit123 commented Nov 8, 2021 via email

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 8, 2021
@k8s-ci-robot k8s-ci-robot merged commit 73f4064 into kubernetes:master Nov 8, 2021
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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants