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

Merge pull request #1126 from marquiz/devel/er-deprecation

nfd-master: deprecate the -resource-labels flag
This commit is contained in:
Kubernetes Prow Robot 2023-04-13 10:52:39 -07:00 committed by GitHub
commit 84c348b69f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -61,6 +61,7 @@ func main() {
case "label-whitelist": case "label-whitelist":
args.Overrides.LabelWhiteList = overrides.LabelWhiteList args.Overrides.LabelWhiteList = overrides.LabelWhiteList
case "resource-labels": case "resource-labels":
klog.Warningf("-resource-labels is deprecated, extended resources should be managed with NodeFeatureRule objects")
args.Overrides.ResourceLabels = overrides.ResourceLabels args.Overrides.ResourceLabels = overrides.ResourceLabels
case "enable-taints": case "enable-taints":
args.Overrides.EnableTaints = overrides.EnableTaints args.Overrides.EnableTaints = overrides.EnableTaints
@ -143,7 +144,7 @@ func initFlags(flagset *flag.FlagSet) (*master.Args, *master.ConfigOverrideArgs)
flagset.Var(overrides.DenyLabelNs, "deny-label-ns", flagset.Var(overrides.DenyLabelNs, "deny-label-ns",
"Comma separated list of denied label namespaces") "Comma separated list of denied label namespaces")
flagset.Var(overrides.ResourceLabels, "resource-labels", flagset.Var(overrides.ResourceLabels, "resource-labels",
"Comma separated list of labels to be exposed as extended resources.") "Comma separated list of labels to be exposed as extended resources. DEPRECATED: use NodeFeatureRule objects instead")
return args, overrides return args, overrides
} }

View file

@ -256,6 +256,9 @@ nfd-master -deny-label-ns=*.vendor.com,vendor-2.io
### -resource-labels ### -resource-labels
**DEPRECATED**: [NodeFeatureRule](../usage/custom-resources.md#nodefeaturerule)
should be used for managing extended resources in NFD.
The `-resource-labels` flag specifies a comma-separated list of features to be The `-resource-labels` flag specifies a comma-separated list of features to be
advertised as extended resources instead of labels. Features that have integer advertised as extended resources instead of labels. Features that have integer
values can be published as Extended Resources by listing them in this flag. values can be published as Extended Resources by listing them in this flag.

View file

@ -71,6 +71,10 @@ denyLabelNs: ["denied.ns.io","denied.kubernetes.io"]
``` ```
## resourceLabels ## resourceLabels
**DEPRECATED**: [NodeFeatureRule](../usage/custom-resources.md#nodefeaturerule)
should be used for managing extended resources in NFD.
The `resourceLabels` option specifies a list of features to be The `resourceLabels` option specifies a list of features to be
advertised as extended resources instead of labels. Features that have integer advertised as extended resources instead of labels. Features that have integer
values can be published as Extended Resources by listing them in this option. values can be published as Extended Resources by listing them in this option.