[SURE-8757] Harvester rke machine config is not placed into the correct fleet workspace
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-defaultnamespace.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)configsCRs infleet-defaultnamespace 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 inmetadata.namespaceit only changes namespace of to-be-created cluster object and has no effect on already createdrke-machine-config.cattle.io.(Provider)configsCRs. If before hitting "Create" I manually create the samerke-machine-config.cattle.io.(Provider)configsobjects in desired namespace, everything seems to work OK (note that before the cluster object is created one must retain configs infleet-defaultnamespace 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.namespaceon the YAML shown.
This has morphed from a bug into a feature request; perhaps not for v2.12.2, rather for v2.13+ then? 🤔