From 8511980bf4d0ef84085aea98a492cc8f7b070364 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Thu, 13 Apr 2023 11:14:43 +0300 Subject: [PATCH] nfd-master: deprecate the -resource-labels flag Mark the -resource-labels flag (and the corresponding resourceLabels config option) as deprecated. We now support managing extended resources via NodeFeatureRule objects. This kludge deserves to go, eventually. --- cmd/nfd-master/main.go | 3 ++- docs/reference/master-commandline-reference.md | 3 +++ docs/reference/master-configuration-reference.md | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/nfd-master/main.go b/cmd/nfd-master/main.go index 58d0ca432..340ffcf09 100644 --- a/cmd/nfd-master/main.go +++ b/cmd/nfd-master/main.go @@ -61,6 +61,7 @@ func main() { case "label-whitelist": args.Overrides.LabelWhiteList = overrides.LabelWhiteList case "resource-labels": + klog.Warningf("-resource-labels is deprecated, extended resources should be managed with NodeFeatureRule objects") args.Overrides.ResourceLabels = overrides.ResourceLabels case "enable-taints": 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", "Comma separated list of denied label namespaces") 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 } diff --git a/docs/reference/master-commandline-reference.md b/docs/reference/master-commandline-reference.md index bf8cc7787..c1260e989 100644 --- a/docs/reference/master-commandline-reference.md +++ b/docs/reference/master-commandline-reference.md @@ -256,6 +256,9 @@ nfd-master -deny-label-ns=*.vendor.com,vendor-2.io ### -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 advertised as extended resources instead of labels. Features that have integer values can be published as Extended Resources by listing them in this flag. diff --git a/docs/reference/master-configuration-reference.md b/docs/reference/master-configuration-reference.md index 7957d4ab5..b11bb4cb8 100644 --- a/docs/reference/master-configuration-reference.md +++ b/docs/reference/master-configuration-reference.md @@ -71,6 +71,10 @@ denyLabelNs: ["denied.ns.io","denied.kubernetes.io"] ``` ## 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 advertised as extended resources instead of labels. Features that have integer values can be published as Extended Resources by listing them in this option.