cluster-api-provider-openstack icon indicating copy to clipboard operation
cluster-api-provider-openstack copied to clipboard

Support Flatcar linux for nodes

Open kopiczko opened this issue 3 years ago • 10 comments

/kind feature

Describe the solution you'd like I would like to be able to use Flatcar linux for the control plane and worker nodes with CAPO.

Anything else you would like to add: I was already able to bring up a working cluster. There is also image-builder PR I'm working on https://github.com/kubernetes-sigs/image-builder/pull/907. I'd be happy to work on this.

kopiczko avatar Jun 13 '22 19:06 kopiczko

CAPO should already support ignitions (OCP use it) though I am not sure we have such e2e test so far..

jichenjc avatar Jun 14 '22 06:06 jichenjc

I think this would be a kubeadm feature? What patches might we need in CAPO to support this?

mdbooth avatar Jun 14 '22 08:06 mdbooth

If Ignition is already supported, then hopefully it should be similar to CAPZ, where we only add templates + e2e tests.

invidian avatar Jun 14 '22 08:06 invidian

I was already able to create a working cluster:

$ k get node -o wide
NAME                                 STATUS   ROLES                  AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE                                             KERNEL-VERSION    CONTAINER-RUNTIME
pawe3-control-plane-5e7b8f08-lp2l4   Ready    control-plane,master   13h   v1.22.9   10.6.0.176    <none>        Flatcar Container Linux by Kinvolk 3139.2.2 (Oklo)   5.15.43-flatcar   containerd://1.6.2
pawe3-default-699dba55-b8zq6         Ready    <none>                 13h   v1.22.9   10.6.0.64     <none>        Flatcar Container Linux by Kinvolk 3139.2.2 (Oklo)   5.15.43-flatcar   containerd://1.6.2
pawe3-default-699dba55-fqcpc         Ready    <none>                 13h   v1.22.9   10.6.0.193    <none>        Flatcar Container Linux by Kinvolk 3139.2.2 (Oklo)   5.15.43-flatcar   containerd://1.6.2
pawe3-default-699dba55-qswp2         Ready    <none>                 13h   v1.22.9   10.6.0.110    <none>        Flatcar Container Linux by Kinvolk 3139.2.2 (Oklo)   5.15.43-flatcar   containerd://1.6.2

From CAPO side it's only about providing templates and documentation I think.

kopiczko avatar Jun 14 '22 08:06 kopiczko

Cross-posting here https://github.com/kubernetes/cloud-provider-openstack/issues/1923

OCCM doesn't start from helm chart with default values as of right now :(

Edit: this is sorted now.

kopiczko avatar Jun 15 '22 18:06 kopiczko

There is no real support for Flatcar in image-builder. Some post-processing has to be applied to the QEMU image. I created an issue: https://github.com/kubernetes-sigs/image-builder/issues/937

kopiczko avatar Jul 18 '22 19:07 kopiczko

Can you point me to places where:

  • templates can be provided
  • e2e tests should be added

kopiczko avatar Jul 22 '22 16:07 kopiczko

There is also this issue https://github.com/kubernetes-sigs/image-builder/issues/939 but we can provider the dropin in the templates for the time being.

kopiczko avatar Jul 22 '22 16:07 kopiczko

The default value for the OpenStack image to use is defined here: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/f040fc433cccbfd654c636e66e8717373a2f294c/test/e2e/data/e2e_conf.yaml#L112 And used in the e2e test, e.g. here: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/f040fc433cccbfd654c636e66e8717373a2f294c/test/e2e/suites/e2e/e2e_test.go#L686

Adding a second e2e job and setting the OPENSTACK_IMAGE_NAME env is probably not what we want. Link to e2e test job yaml

Maybe we can introduce a new variable OPENSTACK_FLATCAR_IMAGE_NAME and add a new e2e case similar to: https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/f040fc433cccbfd654c636e66e8717373a2f294c/test/e2e/suites/e2e/e2e_test.go#L676

seanschneeweiss avatar Jul 23 '22 09:07 seanschneeweiss

What's the goal here? I don't think the OS installed is relevant to CAPO, so I'm not especially interested in adding e2e tests just for the purposes of showing it also works on CAPO.

Or are we talking about adding a new release template which uses Flatcar? In that case we'd probably want a test which uses that template, although it could likely run as a periodic rather than a presubmit.

mdbooth avatar Jul 23 '22 16:07 mdbooth

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Oct 21 '22 17:10 k8s-triage-robot

/remove-lifecycle stale

kopiczko avatar Oct 24 '22 15:10 kopiczko

@mdbooth yeah ideally I'd like to have the template for the Flatcar and make sure it isn't broken. Providing the template is quite easy. Any pointers where to start with the tests?

kopiczko avatar Oct 24 '22 15:10 kopiczko

@kopiczko do you have a copy of the template you used?

mnaser avatar Nov 16 '22 15:11 mnaser

Hi @mnaser we are using our own helm chart https://github.com/giantswarm/cluster-openstack/blob/main/helm/cluster-openstack with ignition.enable=true set. You can always helm template ... and turn it into a template if you wish.

kopiczko avatar Nov 16 '22 20:11 kopiczko

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Dec 16 '22 21:12 k8s-triage-robot

/remove-lifecycle rotten

invidian avatar Dec 16 '22 21:12 invidian

@kopiczko any progress on this? thanks

lukasmrtvy avatar Jan 02 '23 22:01 lukasmrtvy

@lukasmrtvy I won't have time to work on that one in the nearest future I'm afraid. Possibly I'll be revisiting it at some point but no plans now.

kopiczko avatar Jan 03 '23 13:01 kopiczko

@kopiczko could I please bug you to add a brief overall status of the PR and maybe a list of open TODOs to be implemented to wrap things up? It would make it easier for others to pick up your great work.

t-lo avatar Jan 04 '23 15:01 t-lo