diff --git a/cmd/nfd-master/main.go b/cmd/nfd-master/main.go index 0718be36e3..6c60a92f7f 100644 --- a/cmd/nfd-master/main.go +++ b/cmd/nfd-master/main.go @@ -117,7 +117,8 @@ func initFlags(flagset *flag.FlagSet) (*master.Args, *master.ConfigOverrideArgs) flagset.StringVar(&args.Kubeconfig, "kubeconfig", "", "Kubeconfig to use") flagset.BoolVar(&args.EnableNodeFeatureApi, "enable-nodefeature-api", true, - "Enable the NodeFeature CRD API for receiving node features. This will automatically disable the gRPC communication.") + "Enable the NodeFeature CRD API for receiving node features. This will automatically disable the gRPC communication."+ + "DEPRECATED: will be removed in a future release along with the deprecated gRPC API.") flagset.BoolVar(&args.CrdController, "featurerules-controller", true, "Enable NFD CRD API controller. DEPRECATED: use -crd-controller instead") flagset.BoolVar(&args.CrdController, "crd-controller", true, diff --git a/cmd/nfd-worker/main.go b/cmd/nfd-worker/main.go index f9c8a47a6e..6a0c3f62e4 100644 --- a/cmd/nfd-worker/main.go +++ b/cmd/nfd-worker/main.go @@ -104,7 +104,8 @@ func initFlags(flagset *flag.FlagSet) (*worker.Args, *worker.ConfigOverrideArgs) flagset.StringVar(&args.KeyFile, "key-file", "", "Private key matching -cert-file") flagset.BoolVar(&args.EnableNodeFeatureApi, "enable-nodefeature-api", true, - "Enable the NodeFeature CRD API for communicating with nfd-master. This will automatically disable the gRPC communication.") + "Enable the NodeFeature CRD API for communicating with nfd-master. This will automatically disable the gRPC communication."+ + "DEPRECATED: will be removed in a future release along with the deprecated gRPC API.") flagset.StringVar(&args.Kubeconfig, "kubeconfig", "", "Kubeconfig to use") flagset.BoolVar(&args.Oneshot, "oneshot", false, diff --git a/docs/developer-guide/index.md b/docs/developer-guide/index.md index 918c108e09..7e1dddad44 100644 --- a/docs/developer-guide/index.md +++ b/docs/developer-guide/index.md @@ -166,6 +166,11 @@ make e2e-test KUBECONFIG=$HOME/.kube/config ## Running locally +> ****DEPRECATED**: Running NFD locally is deprecated and will be removed in a +> future release. It depends on the gRPC API which is deprecated and will be +> removed in a future release. To run NFD locally, use the +> `-enable-nodefeature-api=false` flag. + You can run NFD locally, either directly on your host OS or in containers for testing and development purposes. This may be useful e.g. for checking features-detection. @@ -174,7 +179,8 @@ features-detection. When running as a standalone container labeling is expected to fail because Kubernetes API is not available. Thus, it is recommended to use `-no-publish` -command line flag. E.g. +Also specify `-crd-controller=false` and `-enable-nodefeature-api=false` +command line flags to disable CRD controller and enable gRPC. E.g. ```bash $ export NFD_CONTAINER_IMAGE={{ site.container_image }} @@ -185,11 +191,11 @@ $ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish ### NFD-Worker -In order to run nfd-worker as a "stand-alone" container against your -standalone nfd-master you need to run them in the same network namespace: +In order to run nfd-worker as a "stand-alone" container +you need to run it in the same network namespace as the nfd-master container: ```bash -$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker +$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker -enable-nodefeature-api=false 2019/02/01 14:48:56 Node Feature Discovery Worker ... ``` @@ -206,11 +212,11 @@ pass the `-no-publish` flag to nfd-worker. ### NFD-Topology-Updater -In order to run nfd-topology-updater as a "stand-alone" container against your -standalone nfd-master you need to run them in the same network namespace: +In order to run nfd-topology-updater as a "stand-alone" container +you need to run it in the same network namespace as the nfd-master container: ```bash -$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-topology-updater +$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-topology-updater -no-publish 2019/02/01 14:48:56 Node Feature Discovery Topology Updater ... ``` diff --git a/docs/reference/master-commandline-reference.md b/docs/reference/master-commandline-reference.md index 829f038870..b8735f4d4f 100644 --- a/docs/reference/master-commandline-reference.md +++ b/docs/reference/master-commandline-reference.md @@ -153,6 +153,9 @@ nfd-master -verify-node-name -ca-file=/opt/nfd/ca.crt \ ### -enable-nodefeature-api +> **NOTE** the gRPC API is deprecated and will be removed in a future release. +> and this flag will be removed as well. + The `-enable-nodefeature-api` flag enables/disables the [NodeFeature](../usage/custom-resources.md#nodefeature) CRD API for receiving feature requests. This will also automatically disable/enable the gRPC diff --git a/docs/reference/worker-commandline-reference.md b/docs/reference/worker-commandline-reference.md index a8d35e694a..a7d6786da4 100644 --- a/docs/reference/worker-commandline-reference.md +++ b/docs/reference/worker-commandline-reference.md @@ -197,6 +197,9 @@ nfd-worker -label-sources=kernel,system,local ### -enable-nodefeature-api +> **NOTE** the gRPC API is deprecated and will be removed in a future release. +> and this flag will be removed as well. + The `-enable-nodefeature-api` flag enables/disables the [NodeFeature](../usage/custom-resources.md#nodefeature) CRD API for communicating with nfd-master. When enabled nfd-worker creates per-node diff --git a/docs/usage/customization-guide.md b/docs/usage/customization-guide.md index 475b9de5e6..ade4d5fca5 100644 --- a/docs/usage/customization-guide.md +++ b/docs/usage/customization-guide.md @@ -43,7 +43,8 @@ create and manipulate NodeFeature objects in their namespace. The NodeFeature CRD API can be disabled with the `-enable-nodefeature-api=false` command line flag. This flag must be specified for both nfd-master and nfd-worker as it will enable the gRPC communication -between them. +between them. Note that this feature is **DEPRECATED** and will be removed in a +future release. ### A NodeFeature example diff --git a/docs/usage/nfd-master.md b/docs/usage/nfd-master.md index b769a3fcf1..857e29a584 100644 --- a/docs/usage/nfd-master.md +++ b/docs/usage/nfd-master.md @@ -30,11 +30,12 @@ and creates node labels accordingly. The feature data used as the input is received from nfd-worker instances through [NodeFeature](custom-resources.md#nodefeature-custom-resource) objects. -> **NOTE:** when gRPC is used for communicating the features (by setting the -> flag `-enable-nodefeature-api=false` on both nfd-master and nfd-worker, or -> via Helm values.enableNodeFeatureApi=false),(re-)labelling only happens -> when a request is received from nfd-worker. That is, in practice rules are -> evaluated and labels for each node are created on intervals specified by the +> **NOTE**: when gRPC (**DEPRECATED**) when gRPC is used for communicating +> the features (by setting the flag `-enable-nodefeature-api=false` on both +> nfd-master and nfd-worker, or via Helm values.enableNodeFeatureApi=false), +> (re-)labelling only happens when a request is received from nfd-worker. +> That is, in practice rules are evaluated and labels for each node are created +> on intervals specified by the > [`core.sleepInterval`](../reference/worker-configuration-reference.md#coresleepinterval) > configuration option of nfd-worker instances. This means that modification or > creation of NodeFeatureRule objects does not instantly cause the node