Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topology-updater: initialize properly with -no-publish #1554

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions pkg/nfd-topology-updater/nfd-topology-updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,12 @@
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

Check warning on line 136 in pkg/nfd-topology-updater/nfd-topology-updater.go

View check run for this annotation

Codecov / codecov/patch

pkg/nfd-topology-updater/nfd-topology-updater.go#L134-L136

Added lines #L134 - L136 were not covered by tests
}
w.apihelper = apihelper.K8sHelpers{Kubeconfig: kubeconfig}

Check warning on line 139 in pkg/nfd-topology-updater/nfd-topology-updater.go

View check run for this annotation

Codecov / codecov/patch

pkg/nfd-topology-updater/nfd-topology-updater.go#L138-L139

Added lines #L138 - L139 were not covered by tests
if err := w.configure(); err != nil {
return fmt.Errorf("faild to configure Node Feature Discovery Topology Updater: %w", err)
}
Expand Down