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 #1632 from marquiz/devel/fix-nodefeatureapi-feature-gate

Remove references to -enable-nodefeature-api flag
This commit is contained in:
Kubernetes Prow Robot 2024-03-18 09:27:23 -07:00 committed by GitHub
commit 869bb2044d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 36 additions and 30 deletions

View file

@ -185,9 +185,9 @@ func initFlags(flagset *flag.FlagSet) (*master.Args, *master.ConfigOverrideArgs)
"Comma separated list of labels to be exposed as extended resources. DEPRECATED: use NodeFeatureRule objects instead")
flagset.Var(overrides.ResyncPeriod, "resync-period",
"Specify the NFD API controller resync period."+
"It has an effect when the NodeFeature API has been enabled (with -enable-nodefeature-api).")
"It does not have effect when the NodeFeature API has been disabled (with -feature-gates NodeFeatureAPI=false).")
overrides.NfdApiParallelism = flagset.Int("nfd-api-parallelism", 10, "Defines the maximum number of goroutines responsible of updating nodes. "+
"Can be used for the throttling mechanism. It has effect only when -enable-nodefeature-api has been set.")
"Can be used for the throttling mechanism. It does not have effect if NodeFeatureAPI feature gate is disabled.")
return args, overrides
}

View file

@ -62,8 +62,6 @@ func main() {
// Check deprecated flags
flags.Visit(func(f *flag.Flag) {
switch f.Name {
case "enable-nodefeature-api":
klog.InfoS("-enable-nodefeature-api is deprecated, will be removed in a future release along with the deprecated gRPC API")
case "ca-file":
klog.InfoS("-ca-file is deprecated, will be removed in a future release along with the deprecated gRPC API")
case "cert-file":

View file

@ -16,9 +16,9 @@ sort: 5
---
> **DEPRECATED**: this section only applies when the gRPC API is used, i.e.
> when the NodeFeature API is disabled via the `-enable-nodefeature-api=false`
> flag on both nfd-master and nfd-worker. The gRPC API is deprecated and will
> be removed in a future release.
> when the NodeFeature API is disabled (via the `-feature-gates
> NodeFeatureAPI=false` flag) on both nfd-master and nfd-worker. The gRPC API
> is deprecated and will be removed in a future release.
NFD supports mutual TLS authentication between the nfd-master and nfd-worker
instances. That is, nfd-worker and nfd-master both verify that the other end

View file

@ -175,8 +175,8 @@ e2e-tests:
> ****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.
> removed in a future release. To run NFD locally, disable the NodeFeature API
> with `-feature-gates NodeFeatureAPI=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
@ -186,12 +186,12 @@ 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`
Also specify `-crd-controller=false` and `-enable-nodefeature-api=false`
Also specify `-crd-controller=false` and `-feature-gates NodeFeatureAPI=false`
command line flags to disable CRD controller and enable gRPC. E.g.
```bash
$ export NFD_CONTAINER_IMAGE={{ site.container_image }}
$ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish -crd-controller=false -enable-nodefeature-api=false
$ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish -crd-controller=false -feature-gates NodeFeatureAPI=false
2019/02/01 14:48:21 Node Feature Discovery Master <NFD_VERSION>
2019/02/01 14:48:21 gRPC server serving on port: 8080
```
@ -202,7 +202,7 @@ 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 -enable-nodefeature-api=false
$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker -feature-gates NodeFeatureAPI=false
2019/02/01 14:48:56 Node Feature Discovery Worker <NFD_VERSION>
...
```

View file

@ -181,12 +181,13 @@ The `-enable-leader-election` flag enables leader election for NFD-Master.
It is advised to turn on this flag when running more than one instance of
NFD-Master.
This flag takes effect only when combined with `-enable-nodefeature-api` flag.
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: false
```bash
nfd-master -enable-nodefeature-api -enable-leader-election
nfd-master -enable-leader-election
```
### -enable-taints
@ -346,7 +347,8 @@ nfd-master -options='{"noPublish": true}'
The `-nfd-api-parallelism` flag can be used to specify the maximum
number of concurrent node updates.
It takes effect only when `-enable-nodefeature-api` has been set.
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: 10
@ -440,8 +442,9 @@ The `-resync-period` flag specifies the NFD API controller resync period.
The resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,
thus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,
extended resources and taints are in place).
Only has effect when the [NodeFeature](../usage/custom-resources.md#nodefeature)
CRD API has been enabled with [`-enable-nodefeature-api`](master-commandline-reference.md#-enable-nodefeature-api).
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: 1 hour.

View file

@ -152,8 +152,9 @@ The `resyncPeriod` option specifies the NFD API controller resync period.
The resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,
thus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,
extended resources and taints are in place).
Only has effect when the [NodeFeature](../usage/custom-resources.md#nodefeature)
CRD API has been enabled with [`-enable-nodefeature-api`](master-commandline-reference.md#-enable-nodefeature-api).
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: 1 hour.
@ -227,7 +228,8 @@ leaderElection:
The `nfdApiParallelism` option can be used to specify the maximum
number of concurrent node updates.
It takes effect only when `-enable-nodefeature-api` has been set.
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: 10

View file

@ -149,11 +149,12 @@ nfd-worker -key-file=/opt/nfd/worker.key -cert-file=/opt/nfd/worker.crt -ca-file
### -kubeconfig
The `-kubeconfig` flag specifies the kubeconfig to use for connecting to the
Kubernetes API server. It is only needed for manipulating
[NodeFeature](../usage/custom-resources.md#nodefeature) objects, and thus the flag
only takes effect when
[`-enable-nodefeature-api`](#-enable-nodefeature-api)) is specified. An empty
value (which is also the default) implies in-cluster kubeconfig.
Kubernetes API server. It is needed for manipulating
[NodeFeature](../usage/custom-resources.md#nodefeature) objects. An empty value
(which is also the default) implies in-cluster kubeconfig.
Does not have effect if the [NodeFeatureAPI](feature-gates.md#nodefeatureapi)
feature gate is disabled.
Default: *empty*

View file

@ -41,10 +41,12 @@ Note that RBAC rules must be created for each extension for them to be able to
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. Note that the gRPC API is **DEPRECATED** and will be removed in a
future release, at which point the NodeFeature API cannot be disabled.
[NodeFeatureAPI](../reference/feature-gates.md#nodefeatureapi) feature gate
(`-feature-gates NodeFeatureAPI=false` on command line). The `-feature-gates`
command line flag must be specified for both nfd-master and nfd-worker as it
will enable the gRPC communication between them. Note that the gRPC API is
**DEPRECATED** and will be removed in a future release, at which point the
NodeFeature API cannot be disabled.
### A NodeFeature example

View file

@ -190,7 +190,7 @@ var _ = NFDDescribe(Label("nfd-master"), func() {
nfdTestSuite := func(useNodeFeatureApi bool) {
createPodSpecOpts := func(opts ...testpod.SpecOption) []testpod.SpecOption {
if !useNodeFeatureApi {
return append(opts, testpod.SpecWithContainerExtraArgs("-enable-nodefeature-api=false"))
return append(opts, testpod.SpecWithContainerExtraArgs("-feature-gates", "NodeFeatureAPI=false"))
}
return opts
}