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:
parent
4b799b7e8f
commit
9eb98040e9
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue