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

Support for MachinePool in CABPK #1799

Closed
juan-lee opened this issue Nov 24, 2019 · 3 comments · Fixed by #1885
Closed

Support for MachinePool in CABPK #1799

juan-lee opened this issue Nov 24, 2019 · 3 comments · Fixed by #1885
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@juan-lee
Copy link
Contributor

User Story

As a developer I would like to be able to leverage the CABPK to provide bootstrap config to types other than Machine and MachineSet for the purposes of adding support for MachinePool or other future types that might require bootstrap configuration.

Detailed Description

Currently CABPK depends on Machine to determine if it needs to generate bootstrap configuration that Machine will consume to provide as input to its infrastructure provider. In order for MachinePool to take advantage of how CABPK provides bootstrap configuration, CABPK will need to become more generic.

CABPK depends on Machine to:

  • Get the owning Cluster instance
  • Check if a Machine's Infrastructure is ready
  • Check if a Machine's Bootstrap.Data is already populated
  • Provide a fallback k8s version if not specified in KubeadmConfig
  • Check if a Machine is a control plane
  • Locking if the Machine is a control plane

Proposed Changes

  • Provide a data interface via Unstructured for the KubeadmConfig to reference instead of Machine
  • Add a watch for MachinePool - explicit references to Machine and MachinePool are still required for watch
  • Keep explicit dependency on Machine for managing control plane
  • Generic implementation for handling non-control plane Machines

Anything else you would like to add:

#1703 and #1665 are dependent on this feature.

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 24, 2019
@vincepri vincepri added this to the v0.3.0 milestone Dec 2, 2019
@ncdc
Copy link
Contributor

ncdc commented Dec 3, 2019

Provide a data interface via Unstructured for the KubeadmConfig to reference instead of Machine

@juan-lee could you expand on what you mean here?

@vincepri
Copy link
Member

vincepri commented Dec 3, 2019

I originally suggested to @juan-lee that we could use an approach like we do today when we handle external objects in the Machine and Cluster controller code.

By providing a contract to the KubeadmConfig owner's, we can use different API types / CRDs and use the unstructured package to get the information we need (for example the cluster name).

This would remove the need for a KubeadmConfig's owner to be a Machine and its use beyond single machine objects.

@ncdc
Copy link
Contributor

ncdc commented Dec 3, 2019

Ok, thanks for the clarification. That's what I thought but I wasn't certain.

@ncdc ncdc added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. 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.

4 participants