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

Expose the kubeadm join workflow as phases #1204

Closed
12 of 13 tasks
fabriziopandini opened this issue Oct 31, 2018 · 20 comments
Closed
12 of 13 tasks

Expose the kubeadm join workflow as phases #1204

fabriziopandini opened this issue Oct 31, 2018 · 20 comments
Assignees
Labels
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/tracking-issue 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.
Milestone

Comments

@fabriziopandini
Copy link
Member

fabriziopandini commented Oct 31, 2018

as per comment kubernetes/kubernetes#70333 (comment)

in v1.12 we are exposing the kubeadm init workflow as phases, and moving all the other commands formerly hoster under kubeadm alpha phase to kubeadm alpha (without phases).
This re-shuffle includes also subcommands that are part of the kubeadm join workflow (e.g. preflight node, kubelet config download).

if there is consensus, we should start from those pieces and expose also the kubeadm join workflow as phases


plan:

old KEP for phases:
https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/0029-20180918-kubeadm-phases-beta.md

(neolit123): here is document for discussing the phases for join:
https://docs.google.com/document/d/1nkTy7r1pBZvQT_YnuGHEQ5MrQZBaC2A7frXxzd6y7m0/edit?usp=sharing

we need to evict the Run method from join.go and move the logic to join phases.
the phase runner mechanic that we use in init.go should be used for that.

NOTE: the merging of PRs should happen in the exact order bellow.

list of phases, action items, PRs, assignees :


item: move the fetching of init configuration to joinData struct + prepare for phases.
assigned: @neolit123

notes: we need to move the init config from Run() to joinData as an (e.g.) initConfig field.

this is is a preliminary step and has to happen before everything else


item: get args working for leaf phases
assigned: @ereslibre


item: phase name preflight
assigned: @MalloZup

note: includes the following logic:

  • general checks
  • optional checks based on initConfig
  • check if ready for additional control plane
  • control plane checks

item: phase name control-plane-prepare
assigned: @ereslibre

notes: function name is PrepareForHostingControlPlane

has these sub phases:

  • certs (create PKI assets)
  • kubeconfig
  • manifests

plus an additional hidden phase named etcdCheck

  • etcd check (if initConfiguration.Etcd.External == nil from PrepareForHostingControlPlane)

item: phase name kubelet-start
assigned: @yagonobre

notes: function name is BootstrapKubelet
no sub phases, all logic in a single runner callback function.


item: phase name control-plane-join
assigned: @RA489

notes: main function name is PostInstallControlPlane but also code from Run()

has these sub phases:

  • etcd-local
  • upload-config
  • mark-control-plane

item: make a final check on the UX, with focus on args (e.g. evaluate if args should be made phase specific)

See document Auditing Join Phases
https://docs.google.com/document/d/1tqgjB_KJMeYAXHYqOuBKKpCLSzxVgSl-MUfXf7d8C8U/edit?usp=sharing

Decide on how to handle the extra arg (see comment on the issue)
#1375
assigned: TBD

  • PR:

Fix labels and help messages
assigned: @fabriziopandini

First pass on flags (add missing flags, optimize usage of discovery flags)
assigned: @fabriziopandini

Second pass on flags (check and remove flags marked as why?)
assigned: @neolit123

Cleanup of join output (all the message should be prefixed by the phase name, where possible print messages should be made equal to init)
assigned: @neolit123

Cleanup of preflight checks (join call preflight twice; make the second call skip checks already executed by the first one or make a new preflight check function for join control-plane)
assigned: @neolit123

@fabriziopandini fabriziopandini added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. kind/feature Categorizes issue or PR as related to a new feature. labels Oct 31, 2018
@fabriziopandini fabriziopandini added this to the v1.14 milestone Oct 31, 2018
@yagonobre
Copy link
Member

I can work on it in the next cycle
/assign @yagonobre
/lifecycle active

@k8s-ci-robot k8s-ci-robot added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Nov 14, 2018
@fabriziopandini
Copy link
Member Author

@yagonobre great!
Looking forward for the draft of the list of phases to be implemented!

@timothysc timothysc added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Jan 7, 2019
@neolit123 neolit123 removed the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Jan 15, 2019
@neolit123
Copy link
Member

/assign

we are going to track the work in this issue and possibly have volunteers help us with that.

after this PR merged:
kubernetes/kubernetes#72442
we need to solidify/define the list of phases for join.

@neolit123 neolit123 added the lifecycle/active Indicates that an issue or PR is actively being worked on by a contributor. label Jan 15, 2019
@ereslibre
Copy link
Contributor

I'm also willing to help with this effort, as of todays kubeadm office hours meeting.

@RA489
Copy link
Contributor

RA489 commented Jan 17, 2019

I can also help with this effort.

@RA489
Copy link
Contributor

RA489 commented Jan 18, 2019

taking control-plane-join phase.

@neolit123
Copy link
Member

@RA489 thanks, assigned.

as a reminder, please note that the PRs have to come in order.
preflight -> control plane -> .....

@ereslibre
Copy link
Contributor

I can take control-plane-prepare phase

@MalloZup
Copy link

MalloZup commented Jan 18, 2019

@neolit123 i can take the preflight one

@neolit123
Copy link
Member

thanks @ereslibre and @MalloZup .
the only vacant item now is kubelet-start

@yagonobre
Copy link
Member

I can take kubelet-start

@neolit123
Copy link
Member

thanks you @yagonobre

@k8s-ci-robot
Copy link
Contributor

@MalloZup: GitHub didn't allow me to assign the following users: MalloZup.

Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @MalloZup

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.

@neolit123
Copy link
Member

neolit123 commented Jan 21, 2019

the base PR for phases in join has merged.
@MalloZup you can start with the PR for preflight.

@MalloZup
Copy link

@neolit123 thx for infos. yop i'm looking at it 🚀

@ereslibre
Copy link
Contributor

control-plane-prepare phase is ready for review in kubernetes/kubernetes#73145

@neolit123
Copy link
Member

thanks for everyone who contributed. all the PRs for phases are added.
we now need to focus on auditing them.

it will be OK to push bugfixes even after code freeze.

@neolit123
Copy link
Member

neolit123 commented Feb 28, 2019

i will help next week or later this week to verify the join phases.

also this doc already has outlined some nits (thanks @fabriziopandini )
https://docs.google.com/document/d/1tqgjB_KJMeYAXHYqOuBKKpCLSzxVgSl-MUfXf7d8C8U/edit#
(if you don't see the comments on the right of the doc screen - make sure you zoom out)

@neolit123
Copy link
Member

we are pretty much done here, minus:

Decide on how to handle the extra arg (see comment on the issue)
#1375

which is for 1.15.

and auditing.

@neolit123 neolit123 modified the milestones: v1.14, v1.15 Mar 11, 2019
@neolit123
Copy link
Member

neolit123 commented Apr 22, 2019

closing this ticket as the work here is done.
leaving #1375 as a standalone ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/tracking-issue 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

No branches or pull requests

8 participants