Skip to content

Commit

Permalink
hooks: disable hooks by default
Browse files Browse the repository at this point in the history
We have deprecated hooks in v0.12.0 but kept it enabled by default.
Starting from v0.13.x we are starting to disable it by default and
plan to fully remove it in v0.14.x if there are no objections from
the community.

Signed-off-by: Muyassarov, Feruzjon <[email protected]>
  • Loading branch information
fmuyassarov committed Apr 24, 2023
1 parent 2356223 commit 4238620
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# - "vendor"
# - "device"
# local:
# hooksEnabled: true
# hooksEnabled: false
# custom:
# # The following feature demonstrates the capabilities of the matchFeatures
# - name: "my custom rule"
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/node-feature-discovery/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ worker:
# - "vendor"
# - "device"
# local:
# hooksEnabled: true
# hooksEnabled: false
# custom:
# # The following feature demonstrates the capabilities of the matchFeatures
# - name: "my custom rule"
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/worker-configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Example:
```yaml
sources:
local:
hooksEnabled: true # true by default
hooksEnabled: false # disabled by default
```

### sources.pci
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/customization-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ trying to execute them. A subdirectory under the hooks directory can be used,
for example `/etc/kubernetes/node-feature-discovery/source.d/conf/`.

**NOTE:** Hooks are being DEPRECATED and will be removed in a future release.
For backward compatibility, currently hooks are enabled by default and can be
disabled via `sources.local.hooksEnabled` field in the worker configuration.
Starting from release v0.13.2 hooks are disabled by default and can be
enabled via `sources.local.hooksEnabled` field in the worker configuration.

```yaml
sources:
Expand Down
2 changes: 1 addition & 1 deletion source/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s *localSource) GetLabels() (source.FeatureLabels, error) {
// newDefaultConfig returns a new config with pre-populated defaults
func newDefaultConfig() *Config {
return &Config{
HooksEnabled: true,
HooksEnabled: false,
}
}

Expand Down

0 comments on commit 4238620

Please sign in to comment.