fleet icon indicating copy to clipboard operation
fleet copied to clipboard

[SURE-8757] Harvester rke machine config is not placed into the correct fleet workspace

Open kkaempf opened this issue 5 months ago • 1 comments

SURE-8757

All, had a chance to look into it and it looks like this is UI issue that may not have an easy fix due to and it may be expectation that clusters created via UI always end up in fleet-default namespace.

When "Edit as YAML" is pressed on the UI after configuring cluster/pool settings UI sends POST requests to Rancher to create corresponding rke-machine-config.cattle.io.(Provider)configs CRs in fleet-default namespace as that's the namespace we're creating cluster and corresponding objects in. These objects need to be created before displaying YAML to the user as they are referenced by name there. Then when cluster's namespace is changed on YAML in metadata.namespace it only changes namespace of to-be-created cluster object and has no effect on already created rke-machine-config.cattle.io.(Provider)configs CRs. If before hitting "Create" I manually create the same rke-machine-config.cattle.io.(Provider)configs objects in desired namespace, everything seems to work OK (note that before the cluster object is created one must retain configs in fleet-default namespace as UI queries/updates them and will error out if these objects are not there).

So we have a bit of "chicken-egg" situation here and is basically unsupported UI scenario. If we need to provide an option for specifying cluster namespace it looks like a UI enhancement to allow specifying the namespace on cluster creation form so UI can use it to create these dependent objects - and we should provide a warning to not manually update metadata.namespace on the YAML shown.

kkaempf avatar Jul 29 '25 07:07 kkaempf

This has morphed from a bug into a feature request; perhaps not for v2.12.2, rather for v2.13+ then? 🤔

weyfonk avatar Sep 04 '25 15:09 weyfonk