Guest blog post from Maxime Guyot

Kubespray is a set of Ansible playbooks to deploy and manage a Production Ready Kubernetes Cluster. It supports a wide range of operating systems (Ubuntu, Centos, Fedora, Flatcar, …), CNIs (Calico, Cilium, Weave, Flannel, …) and container engines (Docker, containerd, CRI-O). As such the project has big focus on upgradability and end to end tests.A recurrent problem for maintainers was testing patches related to specific cloud platforms like OpenStack. After consulting with the community, this lead to establishing a sponsorship/donation with OVHcloud – one of the leadingOpenStack based public cloud providers. After integrating OVHcloud’s Openstack in Kubespray’s Continuous Integration pipeline, all PRs submitted to the project are now tested on the OVHcloud OpenStack cloud, ensuring full compatibility with the OpenStack APIs. This has allowed the project to move faster with development, but also to ensure robust support for Openstack based deployments.Would you like to try it out? A tutorial is available in https://github.com/kubernetes-sigs/kubespray/blob/master/contrib/terraform/openstack/README.md

Lessons learned

Software sometimes fails in unexpected ways, and sometimes the resource cleanup task executed after each test job fails due to unexpected conditions (timeout, API error, …) which can leave orphaned virtual machines running afterwards.In an effort to mitigate this and not be wasteful of donated infrastructure resources, a periodic script deletes all virtual machines older than 4 hours. This approach might be useful for readers who also struggle with cleaning up orphaned VM instances. More information on this here https://github.com/kubernetes-sigs/kubespray/tree/master/scripts/openstack-cleanup

Further work

The next step for OpenStack CI in Kubespray is to test the installation of the out-of-tree Cinder CSI controller (see PR https://github.com/kubernetes-sigs/kubespray/pull/5740) Other opportunities include adding support for Octavia ingress controller, testing of openstack-cloud-controller-manager and testing air–gapped cluster installation.

Get involved

Get involved in #kubespray and #kubespray-dev on Kubernetes Slack and on GitHub https://github.com/kubernetes-sigs/kubespray