mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +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>]`.
|
||||
|
||||
> **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.
|
||||
|
||||
Adding following line anywhere to feature file defines date when
|
||||
|
|
|
@ -46,7 +46,7 @@ const ExpiryTimeKey = "expiry-time"
|
|||
const DirectivePrefix = "# +"
|
||||
|
||||
// MaxFeatureFileSize defines the maximum size of a feature file size
|
||||
const MaxFeatureFileSize = 64000
|
||||
const MaxFeatureFileSize = 65536
|
||||
|
||||
// Config
|
||||
var (
|
||||
|
@ -334,8 +334,8 @@ func getFeaturesFromFiles() (map[string]string, error) {
|
|||
fileSize := fileInfo.Size()
|
||||
if fileSize > MaxFeatureFileSize {
|
||||
klog.ErrorS(
|
||||
fmt.Errorf("invalid file size: %d bytes > %d bytes", fileSize, MaxFeatureFileSize),
|
||||
"skipping file with invalid size",
|
||||
fmt.Errorf("file size limit exceeded: %d bytes > %d bytes", fileSize, MaxFeatureFileSize),
|
||||
"skipping too big feature file",
|
||||
"fileName", fileName, "fileSize", fileSize,
|
||||
)
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue