fix: hostname in transformation rules

The hostname is very important for transformation rules.
It should be set if the metaserver returns an empty string.

Signed-off-by: Serge Logvinov <serge.logvinov@sinextra.dev>
This commit is contained in:
Serge Logvinov
2025-03-25 10:29:57 +07:00
parent dc5bfc451f
commit 094360a00b

View File

@@ -139,6 +139,10 @@ func (i *instances) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloud
}
}
if meta.Hostname == "" {
meta.Hostname = node.Name
}
var sysInfo *hardware.SystemInformationSpec
if len(i.c.config.Transformations) > 0 {