mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-15 17:50:49 +00:00
topology-updater: initialize properly with -no-publish
We need to parse kubeconfig (and initialize the apihelper) even with -no-publish as the PodResourcesScanner accesses the k8s API even if we're not publishing/updating NRTs.
This commit is contained in:
parent
d80e4f7411
commit
b452ab6a5c
1 changed files with 5 additions and 6 deletions
|
@ -131,13 +131,12 @@ func (w *nfdTopologyUpdater) Run() error {
|
|||
return fmt.Errorf("failed to get PodResource Client: %w", err)
|
||||
}
|
||||
|
||||
if !w.args.NoPublish {
|
||||
kubeconfig, err := apihelper.GetKubeconfig(w.args.KubeConfigFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.apihelper = apihelper.K8sHelpers{Kubeconfig: kubeconfig}
|
||||
kubeconfig, err := apihelper.GetKubeconfig(w.args.KubeConfigFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
w.apihelper = apihelper.K8sHelpers{Kubeconfig: kubeconfig}
|
||||
|
||||
if err := w.configure(); err != nil {
|
||||
return fmt.Errorf("faild to configure Node Feature Discovery Topology Updater: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue