rancher / elemental

Elemental is a software stack enabling centralized, full cloud-native OS management with Kubernetes.
https://elemental.docs.rancher.com/
Apache License 2.0
296 stars 39 forks source link

Support nmstate to configure networking for the host being provisioned #887

Closed fgiudici closed 3 months ago

fgiudici commented 1 year ago

Spike card to explore how nmstate could be integrated in Elemental and check which are the supported configurations from nm-state.

anmazzotti commented 5 months ago

A little comment on this topic. I was wondering the same for the CAPI project, this is the related issue.

My proposal is to consume the IPAM Provider API. Since this is an API, then it should be possible to implement providers for different IPAM solutions as we see fit. An in-cluster reference implementation can be found here.

This is currently part of CAPI, but my understanding is that (at least in recent Rancher versions) this should be available for the elemental-operator to consume.

kkaempf commented 5 months ago

For reference https://pretalx.com/devconf-cz-2024/talk/XZSYXW/

fgiudici commented 3 months ago

The natural introduction of Elemental Declarative Networking would involve extending https://github.com/rancher/yip to support (declarative) network configuration. The syntax could be the cloud-config one or the one from nmstate, since we would anyway support only NetworkManager as the network configuration tool on the registering hosts.

In both the cases, nmstate would be the ideal backend renderer.

At present, complex network configuration can be achieved creating NetworkManager configuration through cloud-config customization. What is missing is providing a convenient way to assign IP addresses when DHCP is not available on the network, something that nmstate nor cloud-config provide.

For this reason, the networking enhancements in Elemental will be on IP address management (IPAM) solutions (see https://github.com/rancher/elemental/issues/1459).