mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-16 21:38:23 +00:00
docs: add notes in the customization guide about the feature file size limit
Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
parent
026534e355
commit
124dfbf6df
2 changed files with 6 additions and 3 deletions
|
@ -315,6 +315,9 @@ The label value defaults to `true`, if not specified.
|
||||||
|
|
||||||
Label namespace may be specified with `<namespace>/<name>[=<value>]`.
|
Label namespace may be specified with `<namespace>/<name>[=<value>]`.
|
||||||
|
|
||||||
|
> **NOTE:** The feature file size limit it 64kB. The feature file will be
|
||||||
|
> ignored if the size limit is exceeded.
|
||||||
|
|
||||||
Comment lines (starting with `#`) are ignored.
|
Comment lines (starting with `#`) are ignored.
|
||||||
|
|
||||||
Adding following line anywhere to feature file defines date when
|
Adding following line anywhere to feature file defines date when
|
||||||
|
|
|
@ -46,7 +46,7 @@ const ExpiryTimeKey = "expiry-time"
|
||||||
const DirectivePrefix = "# +"
|
const DirectivePrefix = "# +"
|
||||||
|
|
||||||
// MaxFeatureFileSize defines the maximum size of a feature file size
|
// MaxFeatureFileSize defines the maximum size of a feature file size
|
||||||
const MaxFeatureFileSize = 64000
|
const MaxFeatureFileSize = 65536
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
var (
|
var (
|
||||||
|
@ -334,8 +334,8 @@ func getFeaturesFromFiles() (map[string]string, error) {
|
||||||
fileSize := fileInfo.Size()
|
fileSize := fileInfo.Size()
|
||||||
if fileSize > MaxFeatureFileSize {
|
if fileSize > MaxFeatureFileSize {
|
||||||
klog.ErrorS(
|
klog.ErrorS(
|
||||||
fmt.Errorf("invalid file size: %d bytes > %d bytes", fileSize, MaxFeatureFileSize),
|
fmt.Errorf("file size limit exceeded: %d bytes > %d bytes", fileSize, MaxFeatureFileSize),
|
||||||
"skipping file with invalid size",
|
"skipping too big feature file",
|
||||||
"fileName", fileName, "fileSize", fileSize,
|
"fileName", fileName, "fileSize", fileSize,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue