diff --git a/pkg/config/spec.go b/pkg/config/spec.go index 5540418..91d33a1 100644 --- a/pkg/config/spec.go +++ b/pkg/config/spec.go @@ -581,6 +581,16 @@ func ReadUkiInstallSpecFromConfig(c *Config) (*v1.InstallUkiSpec, error) { return &v1.InstallUkiSpec{}, err } installSpec := sp.(*v1.InstallUkiSpec) + // Workaround! + // If we set the "auto" for the device in the cloudconfig the value will be proper in the Config.Install.Device + // But on the cloud-config it will still appear as "auto" as we dont modify that + // Unfortunately as we load the full cloud-config and unmarshall it into our spec, we cannot infer from there + // What device was choosen, and re-choosing again could lead to different results + // So instead we do the check here and override the installSpec.Target with the Config.Install.Device + // as its the soonest we have access to both + if installSpec.Target == "auto" { + installSpec.Target = c.Install.Device + } return installSpec, nil }