Cluster-api: Control Plane tracking issue

Created on 12 Nov 2019  路  24Comments  路  Source: kubernetes-sigs/cluster-api

KubeadmControlPlane implementation

Status: work is blocked on the merging of #1613

Foundational patterns

These tasks put down patterns in order to distribute the remaining work. These will happen more or less serially

  • [x] [@detiber] Merge the new types: https://github.com/kubernetes-sigs/cluster-api/pull/1765

    • KubeadmControlPlaneSpec

    • KubeadmControlPlaneStatus

    • KubeadmControlPlane

    • KubeadmControlPlaneList

    • [ ] Documentation for new types

  • [x] Merge webhook skeleton files (including documentation) for:

    • [x] validation

    • [x] defaulting

  • [x] Merge skeleton of the reconciler (including documentation skeleton): #1826

Follow-up work

These will already have patterns in place and can happen in one or more PRs from one or more authors, generally at any point. There may be exceptions so please check if you are unsure.

Validations & defaulting

  • [x] Document validation and defaulting webhooks including how to set up, requirements and customization if applicable.
  • [x] If KubeadmControlPlane.Spec.KubeadmConfigSpec does not define external etcd (webhook):

    • [x] KubeadmControlPlane.Spec.Replicas is an odd number.

    • [x] Configuration of external etcd is determined by introspecting the provided KubeadmConfigSpec.

  • [x] KubeadmControlPlane.Spec.Replicas is >= 0 or is nil (this is covered because we have a scale subresource - Kubernetes validates this for us)
  • [x] KubeadmControlPlane.Spec.Version != "" (openapi)
  • [x] KubeadmControlPlane.Spec.KubeadmConfigSpec must be treated as immutable (via webhook)

  • [x] KubeadmControlPlane.Spec.Replicas: 1

Modifications

  • [ ] Document changes to types (especially breaking changes)
  • [x] Add ControlPlaneRef and ControlPlaneReady to the ClusterSpec and ClusterStatus types respectively
  • [ ] Update Cluster reconciler with new behaviors:

    • [ ] If Cluster.Spec.ControlPlaneRef is set:



      • [ ] [Status.ControlPlaneInitialized](https://github.com/kubernetes-sigs/cluster-api/issues/1243) is set based on the value of Status.Initialized for the referenced resource.


      • [x] Status.ControlPlaneReady is set based on the value of Status.Ready for the referenced resource, this field is intended to eventually replace Status.ControlPlaneInitialized as a field that will be kept up to date instead of set only once.



    • [x] Current behavior will be preserved if Cluster.Spec.ControlPlaneRef is not set.

    • [x] CA certificate secrets that were previously generated by the Kubeadm bootstrapper will now be generated by the KubeadmControlPlane Controller, maintaining backwards compatibility with the previous behavior if the KubeadmControlPlane is not used.

    • [x] The kubeconfig secret that was previously created by the Cluster Controller will now be generated by the KubeadmControlPlane Controller, maintaining backwards compatibility with the previous behavior if the KubeadmControlPlane is not used.

    • [x] Add FailureDomain implementation to the controller. See https://github.com/kubernetes-sigs/cluster-api/issues/1647 for more information

Main implementation

  • [ ] Document the reconciler to answer general questions such as "what is it", "how does it work", "how do i use it" (issue #1727)
  • [x] Create
  • [x] Delete
  • [x] Scale up
  • [ ] Scale down
  • [ ] Upgrade
  • [ ] Healthcheck
  • [ ] Document the external contract for interoperability with alternative Control Plane implementations.
  • [x] Add support for the KubeadmControlPlane provider to the e2e test framework
areapi arecontrol-plane lifecyclactive prioritimportant-soon

All 24 comments

/milestone v0.3.0
/area api
/area control-plane
/priority important-soon

Please open new issues if more detail is required on any particular task. Maintainers should be able to edit this issue if desirable. If not, please close the issue when it is sufficiently out of date.

Can't edit the thing, but

Document the reconciler to answer general questions such as "what is it", "how does it work", "how do i use it"

is being treated as #1727 unless there's objections.

@randomvariable I updated it above

If anyone wants to volunteer to help out for something, please leave a comment before starting work to let others know that work is inflight for it already.

Current work in progress:

  • @randomvariable is currently working on the control plane provider documentation
  • @detiber is currently working on adding testing for the create workflow for the controller done

@detiber I can take up delete

Just going to note some TODO's here unless someone's got a better idea:

  • [ ] conversion-webhook "msg"="failed to convert" "error"="cannot convert KubeadmConfigStatus's bootstrap data from Secret reference to inline field" - Turned out this was weave flux querying objects at all versions.
  • [ ] Support minimal kubeadmConfigSpecs (for Docker provider) - lack of clusterConfiguration causes NPE

Updated WIP:

  • @randomvariable - Control plane healthchecks (in concert with Docker provider for testing).

I'm going to wire up the e2es with KubeadmControlPlane objects

I'm going to start working on scale up This is done

@dlipovetsky are you still planning on working on delete?

@detiber I was out over the holidays. Yes, working on it!

Another task:
As per https://kubernetes.slack.com/archives/C8TSNPY4T/p1578398060157200, ensure ownerreferences are set on downstream objects

https://github.com/kubernetes-sigs/cluster-api/pull/2015 This is on hold until delete is implemented. I'll start working on scale down or investigate the issue with parallel vs serial scale up https://github.com/kubernetes-sigs/cluster-api/issues/2016

/assign @randomvariable @detiber
/lifecycle active

I'm going to pick up documentation here. I don't expect it to be too verbose yet as things are still rapidly changing, but at least having an example and a high level outline should help somewhat.

Actually I'm going to pick up implementing the Failure Domain business in this controller

Now that delete is in, I'm going to pick up scale down. While etcd healthchecks are being finished, I will work around them in some way--maybe stub them out.

https://github.com/kubernetes-sigs/cluster-api/issues/2244

Documentation

And with that, we can close this issue

/close

@chuckha: Closing this issue.

In response to this:

https://github.com/kubernetes-sigs/cluster-api/issues/2244

Documentation

And with that, we can close this issue

/close

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.

Was this page helpful?
0 / 5 - 0 ratings