1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-31 04:04:51 +00:00
This commit is contained in:
Feruzjon Muyassarov 2025-03-28 08:51:10 +00:00 committed by GitHub
commit 9c421ff621
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -55,8 +55,7 @@ to `false`, a NodeFeatureRule with
foo: bar
```
will turn into `feature.node.kubernetes.io/foo=bar` node label. With
`DisableAutoPrefix` set to `true`, no prefix is added and the label will be
filtered out.
Note that taint keys are not affected by this feature gate.
will be automatically prefixed, resulting in the node label
`feature.node.kubernetes.io/foo=bar`. However, when `DisableAutoPrefix` is set
to `true`, no prefix is added, and the label remains as `foo=bar`. Note that
taint keys are not affected by this feature gate.

View file

@ -482,7 +482,6 @@ func (m *nfdMaster) filterFeatureLabels(labels Labels, features *nfdv1alpha1.Fea
return outLabels
}
func (m *nfdMaster) filterFeatureLabel(name, value string, features *nfdv1alpha1.Features) (string, error) {
// Check if Value is dynamic
var filteredValue string
@ -504,7 +503,9 @@ func (m *nfdMaster) filterFeatureLabel(name, value string, features *nfdv1alpha1
return "", fmt.Errorf("namespace %q is not allowed", ns)
}
} else if err != nil {
return "", err
if !nfdfeatures.NFDFeatureGate.Enabled(nfdfeatures.DisableAutoPrefix) || err != validate.ErrUnprefixedKeysNotAllowed {
return "", err
}
}
// Skip if label doesn't match labelWhiteList