mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
nfd-worker: reload config on each re-discovery pass
Dumb re-read/re-parse of the configuration file on every round of discoery. Probably not the most elegant solution to watch for config file changes, but, it works and doesn't cost much overhead.
This commit is contained in:
parent
a2b9df5cd3
commit
9e813a559c
1 changed files with 3 additions and 3 deletions
|
@ -168,9 +168,6 @@ func (w *nfdWorker) Run() error {
|
|||
stdoutLogger.Printf("Node Feature Discovery Worker %s", version.Get())
|
||||
stdoutLogger.Printf("NodeName: '%s'", nodeName)
|
||||
|
||||
// Parse and apply configuration
|
||||
w.configure(w.args.ConfigFile, w.args.Options)
|
||||
|
||||
// Connect to NFD master
|
||||
err := w.connect()
|
||||
if err != nil {
|
||||
|
@ -179,6 +176,9 @@ func (w *nfdWorker) Run() error {
|
|||
defer w.disconnect()
|
||||
|
||||
for {
|
||||
// Parse and apply configuration
|
||||
w.configure(w.args.ConfigFile, w.args.Options)
|
||||
|
||||
// Get the set of feature labels.
|
||||
labels := createFeatureLabels(w.sources, w.labelWhiteList)
|
||||
|
||||
|
|
Loading…
Reference in a new issue