1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00

source/system: do not publish empty version labels

Do not publish non-existing version components as empty labels.
This commit is contained in:
Markus Lehtonen 2020-03-20 10:12:12 +02:00
parent 4b799b7e8f
commit 9eb98040e9

View file

@ -51,7 +51,9 @@ func (s Source) Discover() (source.Features, error) {
if key == "VERSION_ID" {
versionComponents := splitVersion(value)
for subKey, subValue := range versionComponents {
features[feature+"."+subKey] = subValue
if subValue != "" {
features[feature+"."+subKey] = subValue
}
}
}
}