vexxhost / magnum-cluster-api

Cluster API driver for OpenStack Magnum
Apache License 2.0
45 stars 20 forks source link

Add support for Flatcar Linux #42

Closed mnaser closed 1 year ago

mnaser commented 1 year ago

related:

https://github.com/kubernetes-sigs/cluster-api-provider-openstack/issues/1261 https://github.com/kubernetes-sigs/image-builder/issues/939

lukasmrtvy commented 1 year ago

ping, its doable now :)

stefan-chivu commented 1 year ago

Hi folks, I was wondering why the work for supporting Flatcar Linux has been halted.

I would be interested to contribute and I'd like to know if the work done so far has any reason to be stopped or if it just happened to get to the back of the list of priorities.

mnaser commented 1 year ago

@stefan-chivu at the time, there was a couple of pending items and we got focused on adding support for other things. the way I think we can do this:

  1. create a new driver called k8s_cluster_api_flatcar
  2. create a driver class linked to the above called FlatcarDriver
  3. Use "flatcar" in the "os" field there
  4. In this section you will see how we create the ClusterClass and then use it later, I suggest that we create a new variable for the ClusterClass called operatingSystem and then passing that down when creating the Cluster (like a variable being set here https://github.com/vexxhost/magnum-cluster-api/blob/main/magnum_cluster_api/resources.py#L1660-L1665 called operatingSystem) and defined https://github.com/vexxhost/magnum-cluster-api/blob/main/magnum_cluster_api/resources.py#L758-L773 and json patches like https://github.com/vexxhost/magnum-cluster-api/blob/main/magnum_cluster_api/resources.py#L1231-L1238)

With this, you'll be able to detect if a system is using flatcar, change operatingSystem based on that, and then adjust the different templates in the cluster class

Also, probably would be good to https://github.com/vexxhost/magnum-cluster-api/blob/main/magnum_cluster_api/cmd/image_builder.py to include support for flatcar as well.

@stefan-chivu does that give a fair bit of context? i'm more than happy to provide some resources too in terms of an env/etc+review+chat to discuss it through (fyi, we are in #atmosphere on the kubernetes slack, we're trying to lock down #magnum-cluster-api too)

mnaser commented 1 year ago

@stefan-chivu seems to have followed up!

https://kubernetes.slack.com/archives/C05Q8TDTK6Z/p1695293755953929

Hoping to see the PR soon :D

mnaser commented 1 year ago

closed by @stefan-chivu -- awesome work!