Skip to content

Conversation

@sbueringer
Copy link
Member

@sbueringer sbueringer commented Aug 26, 2019

Migrated to kubeadm bootstrapper as described here: #380 (comment)

Also rewrote the examples (which are probably still far from perfect) and moved them to the examples folder.

Only the operating systems supported by kubeadm bootstrapper are supported now (currently has a dependency to cloud-init >= 18.4 (see kubernetes-retired/cluster-api-bootstrap-provider-kubeadm#41). Ignition is not supported yet.

I tested it with the Ubuntu images from https://github.com/kubernetes-sigs/image-builder/tree/master/images/capi. I tested a 2 control plane node 1 worker node setup with LB and a 1 control plane node 1 worker node without LB scenario.

The user-data must be adjusted if kubelet/kubeadm is not already installed (can be added by further PRs, I justed tested it with an image with pre-installed kubelet/kubeadm)

Note: Examples generation might be a little bit slow because kustomize seems to download the whole cluster-api folder and the vendor folder there hasn't been removed yet.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 26, 2019
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2019
@jichenjc
Copy link
Contributor

@sbueringer I will try this but not sure how long will it take due to some other works in my daily job :) @hidekazuna if you have time , can you help test as well ? :)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2019
@sbueringer sbueringer force-pushed the pr-v1alpha2-kubeadm-bootstrapper branch from fe70579 to 0cb0f81 Compare August 26, 2019 16:01
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 26, 2019
@sbueringer
Copy link
Member Author

All rebased. I'll do some work later today and compare the examples with my own test files

@sbueringer
Copy link
Member Author

sbueringer commented Aug 26, 2019

All rebased. I'll do some work later today and compare the examples with my own test files

Done. I diffed it against my own test yamls at it's very similar. I think the biggest problem will be that you're maybe not using a OS image which already contains kubelet/kubeadm/docker (or containerd)

I think there are two options:

  • Adjust the os image
  • Add an install script to the KubeadmConfig and add a kubeadmPreCommand to execute it

I also changed the examples to deploy a cloud-config into the cluster namespace (which has the same name as the cluster). So we're now flexible to deploy multiple clusters. The controller doesn't have a mounted cloud-config anymore.

P.S. if there are some problems with ca cert or authentication to OpenStack, take a look at the changes in provider.go (should still work, but I couldn't test it for all scenarios)

NAME                                               PROVIDERID                                           PHASE
machine.cluster.x-k8s.io/os1pi020-controlplane-0   openstack:////4e72b47b-8d67-4d8a-a1c1-671961e461f4   running
machine.cluster.x-k8s.io/os1pi020-controlplane-1   openstack:////b3b3140b-e97c-46d8-8a3e-f28253ae9d3a   running
machine.cluster.x-k8s.io/os1pi020-node-01          openstack:////742b9f21-07bc-4dfd-bf74-f16ba5e23402   running

NAME                                                                       AGE
openstackmachine.infrastructure.cluster.x-k8s.io/os1pi020-controlplane-0   11m
openstackmachine.infrastructure.cluster.x-k8s.io/os1pi020-controlplane-1   8m56s
openstackmachine.infrastructure.cluster.x-k8s.io/os1pi020-node-01          8m12s

NAME                                PHASE
cluster.cluster.x-k8s.io/os1pi020   provisioned

NAME                                                        AGE
openstackcluster.infrastructure.cluster.x-k8s.io/os1pi020   33m
+--------------------------------------+-------------------------+--------+----------------------------------------------------+--------------------------+--------+
| ID                                   | Name                    | Status | Networks                                           | Image                    | Flavor |
+--------------------------------------+-------------------------+--------+----------------------------------------------------+--------------------------+--------+
| 742b9f21-07bc-4dfd-bf74-f16ba5e23402 | os1pi020-node-01        | ACTIVE | k8s-clusterapi-cluster-os1pi020-os1pi020=10.6.0.10 | ubuntu-1804-kube-v1.15.0 | large  |
| b3b3140b-e97c-46d8-8a3e-f28253ae9d3a | os1pi020-controlplane-1 | ACTIVE | k8s-clusterapi-cluster-os1pi020-os1pi020=10.6.0.16 | ubuntu-1804-kube-v1.15.0 | large  |
| 4e72b47b-8d67-4d8a-a1c1-671961e461f4 | os1pi020-controlplane-0 | ACTIVE | k8s-clusterapi-cluster-os1pi020-os1pi020=10.6.0.5  | ubuntu-1804-kube-v1.15.0 | large  |
+--------------------------------------+-------------------------+--------+----------------------------------------------------+--------------------------+--------+
NAME                      STATUS     ROLES    AGE     VERSION
os1pi020-controlplane-0   NotReady   master   9m22s   v1.15.0
os1pi020-controlplane-1   NotReady   master   49s     v1.15.0
os1pi020-node-01          NotReady   <none>   5m49s   v1.15.0

@sbueringer sbueringer force-pushed the pr-v1alpha2-kubeadm-bootstrapper branch from d2e921c to 28b1439 Compare August 26, 2019 19:55
@sbueringer sbueringer force-pushed the pr-v1alpha2-kubeadm-bootstrapper branch from 28b1439 to cbdc96c Compare August 26, 2019 19:56
@sbueringer
Copy link
Member Author

sbueringer commented Aug 27, 2019

I updated the doc for the usage of clusterctl. I'm not aware if there are released images for the cluster-api-controller & cluster-api-bootstrap-provider-kubeadm, so the doc doesn't work out of the box. If somebody wants to find out if these images are already their, please do :)

For now I will continue using Tilt for development. At the latest when the other providers are starting to use released images for those two controller we can also start using them

Edit: More info about the current status here: https://kubernetes.slack.com/archives/C8TSNPY4T/p1566928917004400

@roberthbailey roberthbailey removed their request for review August 27, 2019 21:15
@jichenjc
Copy link
Contributor

as we are moving forward on this, let's quick merge and make changes later..

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 28, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc, sbueringer

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 Aug 28, 2019
@k8s-ci-robot k8s-ci-robot merged commit ca26aa6 into kubernetes-sigs:master Aug 28, 2019
@sbueringer sbueringer deleted the pr-v1alpha2-kubeadm-bootstrapper branch August 28, 2019 04:33
@sbueringer
Copy link
Member Author

as we are moving forward on this, let's quick merge and make changes later..

/lgtm
/approve

Thx. I'll update the v1alpha2 issue later.

I would also go over our existing issues & PRs and check if they are still valid.

I also have a few suggestions for followup work

pierreprinetti pushed a commit to shiftstack/cluster-api-provider-openstack that referenced this pull request Apr 22, 2024
* migrate to kubeadm bootstrapper

* update deps

* migrated to kubeadm bootstrapper & rewrite examples

* fix tests

* fix generate tests

* fix test output folder

* fix tests

* migrate to kustomize v3.1.0

* fix awsmachine

* fix version

* fix tests, reorder makefile

* fix tests, update cluster-api dep

* rework examples to be able to deploy  multiple cluster

* ignore controller tests for now

* fix generate test

* fix tests

* bugfix to handle verify from cloud.yaml

* remove fixed todo

* update docs regarding clusterctl
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants