1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

source/kernel: drop length check of kconfig values

Do not do length checking here. We do not need/want to limit the values
here because they could still be used in custom rules. Moreover, we do
more proper validation of label all label values in nfd-worker, anyway.
This commit is contained in:
Markus Lehtonen 2021-11-30 13:56:16 +02:00
parent 5ae7b8bb7a
commit 0df88ac6f6

View file

@ -25,9 +25,6 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"k8s.io/apimachinery/pkg/util/validation"
"k8s.io/klog/v2"
"sigs.k8s.io/node-feature-discovery/source" "sigs.k8s.io/node-feature-discovery/source"
) )
@ -113,10 +110,6 @@ func parseKconfig(configPath string) (map[string]string, error) {
kconfig[name] = "true" kconfig[name] = "true"
} else { } else {
value := strings.Trim(split[1], `"`) value := strings.Trim(split[1], `"`)
if len(value) > validation.LabelValueMaxLength {
klog.Warningf("ignoring kconfig option '%s': value exceeds max length of %d characters", name, validation.LabelValueMaxLength)
continue
}
kconfig[name] = value kconfig[name] = value
} }
} }