mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2025-03-31 04:04:51 +00:00
Merge 947072681f
into 242a4f439f
This commit is contained in:
commit
9c421ff621
2 changed files with 7 additions and 7 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue