mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
reactive updates: add an option to disable the feature
Access to the kubelet state directory may raise concerns in some setups, added an option to disable it. The feature is enabled by default. Signed-off-by: Talor Itzhak <titzhak@redhat.com>
This commit is contained in:
parent
727de56191
commit
5c6be580f4
2 changed files with 8 additions and 4 deletions
|
@ -165,6 +165,8 @@ nfd-topology-updater -pods-fingerprint
|
|||
The `-kubelet-state-dir` specifies the path to the Kubelet state directory,
|
||||
where state and checkpoint files are stored.
|
||||
The files are mount as read-only and cannot be change by the updater.
|
||||
Enabled by default.
|
||||
Passing an empty string will disable the watching.
|
||||
|
||||
Default: /host-var/lib/kubelet
|
||||
|
||||
|
|
|
@ -96,11 +96,13 @@ type nfdTopologyUpdater struct {
|
|||
// NewTopologyUpdater creates a new NfdTopologyUpdater instance.
|
||||
func NewTopologyUpdater(args Args, resourcemonitorArgs resourcemonitor.Args, policy, scope string) (NfdTopologyUpdater, error) {
|
||||
eventSource := make(chan kubeletnotifier.Info)
|
||||
ntf, err := kubeletnotifier.New(resourcemonitorArgs.SleepInterval, eventSource, args.KubeletStateDir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if args.KubeletStateDir != "" {
|
||||
ntf, err := kubeletnotifier.New(resourcemonitorArgs.SleepInterval, eventSource, args.KubeletStateDir)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
go ntf.Run()
|
||||
}
|
||||
go ntf.Run()
|
||||
nfd := &nfdTopologyUpdater{
|
||||
args: args,
|
||||
resourcemonitorArgs: resourcemonitorArgs,
|
||||
|
|
Loading…
Reference in a new issue