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

api: output/v1alpha1 depends on kubeadm/v1beta2 #2427

Closed
3 tasks done
neolit123 opened this issue Apr 1, 2021 · 4 comments · Fixed by kubernetes/kubernetes#107468
Closed
3 tasks done

api: output/v1alpha1 depends on kubeadm/v1beta2 #2427

neolit123 opened this issue Apr 1, 2021 · 4 comments · Fixed by kubernetes/kubernetes#107468
Assignees
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/design Categorizes issue or PR as related to design. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@neolit123
Copy link
Member

neolit123 commented Apr 1, 2021

preparing some of the changes for v1beta3, i realized that we have a problematic dependency that have slipped trough review:
https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/output/v1alpha1/types.go#L32

context: kubeadm has two API groups ATM - output (for machine readable output) and kubeadm (for the kubeadm config API).

embedding of a WIP API in another WIP API is always problematic.

if we continue doing this embedding it forces us to either:

  • keep pinning to v1beta2 until the output group graduates (this of course is absurd)
  • release a new version in the output group every time the kubeadm group releases a new version or when we are about to remove the pinned version. this is far from ideal too, as it is just noise. [*]

possible solutions:

  1. just do [*] before removing v1beta2
  2. release output/v1alpha2 that embeds a complete copy of bootstraptoken and bootstraptokenstring:
    https://github.com/kubernetes/kubernetes/blob/a651804427dd9a15bb91e1c4fb7a79994e4817a2/cmd/kubeadm/app/apis/kubeadm/v1beta2/types.go#L226-L246
    this duplication is also asking for trouble.
  3. move bootstraptoken and bootstraptokenstring to a new API group called "bootstraptoken" and version it v1 (v1 because it hasn't changed in a long time!), make both the new kubeadm API v1beta3 and a new output group v1alpha2 import it. conversion will be likely sketchy but doable.

3 feels like the right thing to do.
i was thinking of another way to handle this by treating BootstrapToken in the output API as runtime.Object, but given this is also in the public API users would need helpers to marshal / unmarshal it.

something else to remind here is that historically we wanted to move the bootstraptoken* API to component-base but this idea was rejected.

added milestone v1.22, but we can technically delay this decision until kubeadm/v1beta2 is removed.

cc @fabriziopandini


tasks:

1.22:

1.23:

1.24:

@neolit123 neolit123 self-assigned this Apr 1, 2021
@neolit123 neolit123 added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Apr 1, 2021
@neolit123 neolit123 added this to the v1.22 milestone Apr 1, 2021
@neolit123 neolit123 changed the title kubeadm-api: output/v1alpha1 depends on kubeadm/v1beta2 api: output/v1alpha1 depends on kubeadm/v1beta2 Apr 1, 2021
@neolit123 neolit123 added the kind/design Categorizes issue or PR as related to design. label Apr 1, 2021
@neolit123 neolit123 added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 14, 2021
@neolit123 neolit123 mentioned this issue Apr 16, 2021
16 tasks
@wangyysde
Copy link
Member

/cc @wangyysde

@danishprakash
Copy link

@neolit123 I'd like to work on this, hope that's ok.

@neolit123
Copy link
Member Author

neolit123 commented May 31, 2021

@danishprakash

let's hold on this work until we make a clearer decision whether we want to proceed with it for 1.22.
please have a look at some of our other tickets with help-wanted labels.

@neolit123
Copy link
Member Author

i did some investigation recently and with that completed the part about:

move bootstraptoken and bootstraptokenstring to a new API group called "bootstraptoken" and version it v1 (v1 because it hasn't changed in a long time!), make both the new kubeadm API v1beta3 and a new output group v1alpha2 import it. conversion will be likely sketchy but doable.

kubernetes/kubernetes#102964

we should keep this issue open, until we deprecate / remove v1beta2:
at that point we should:

  • release a new output API version and make it use bootstraptoken/v1.
  • remove the API version output/v1alpha2 that embeds v1beta2.BootstrapToken.

v1beta2 is not yet deprecated. we might do it in v1.23:
#2459

removing it will take +3 releases after that.

@neolit123 neolit123 added the kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. label Jul 5, 2021
@neolit123 neolit123 removed their assignment Jul 5, 2021
@neolit123 neolit123 modified the milestones: v1.22, v1.23 Jul 5, 2021
@neolit123 neolit123 self-assigned this Sep 15, 2021
@neolit123 neolit123 added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Oct 9, 2021
@neolit123 neolit123 modified the milestones: v1.23, v1.24 Nov 8, 2021
@neolit123 neolit123 removed the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Nov 8, 2021
@neolit123 neolit123 added lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. kind/design Categorizes issue or PR as related to design. lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants