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
303 stars 39 forks source link

Elemental CAPI hostname management #1038

Open anmazzotti opened 1 year ago

anmazzotti commented 1 year ago

This issue is about configuring a machine hostname using the elemental-agent.

Currently a simple useExisting flag was implemented. If on it will use the current hostname value, otherwise it will generate a random UUID.

There are a few issues with this implementation.

It would be better to expand this setting. For example by copying the current machineName formatting implementation.
Instead of using the existing hostname, it would be wiser to explicitly allow for a DHCP server driven hostname. For example allowing a ${DHCP/Domain} value.

Using the current hostname should be removed completely, as it will no longer be an accurate value after reset and we do not want to persist this information so that the elemental-agent can continue to be (mostly) stateless.

Edit: Since this involves network setups and dependency with DHCP, do not forget to take rancher-sandbox/cluster-api-provider-elemental#28 in consideration.

anmazzotti commented 1 year ago

Linking parent epic: #968

@ldevulder FYI