Skip to content

Commit

Permalink
nrtupdater: require nrt client from caller
Browse files Browse the repository at this point in the history
this was the preferred form anyway; it is now required.

Signed-off-by: Francesco Romani <[email protected]>
  • Loading branch information
ffromani committed May 14, 2024
1 parent 405c489 commit f19388b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/nrtupdater/nrtupdater.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/k8stopologyawareschedwg/resource-topology-exporter/pkg/dump"
"github.com/k8stopologyawareschedwg/resource-topology-exporter/pkg/k8sannotations"
"github.com/k8stopologyawareschedwg/resource-topology-exporter/pkg/k8shelpers"
"github.com/k8stopologyawareschedwg/resource-topology-exporter/pkg/metrics"
"github.com/k8stopologyawareschedwg/resource-topology-exporter/pkg/podreadiness"
)
Expand Down Expand Up @@ -75,11 +74,7 @@ func (mi MonitorInfo) UpdateReason() string {

func NewNRTUpdater(nodeGetter NodeGetter, nrtCli topologyclientset.Interface, args Args, tmconf TMConfig) (*NRTUpdater, error) {
if nrtCli == nil {
cli, err := k8shelpers.GetTopologyClient(args.KubeConfig)
if err != nil {
return nil, err
}
nrtCli = cli
return nil, fmt.Errorf("missing NRT client interface")
}
return &NRTUpdater{
args: args,
Expand Down

0 comments on commit f19388b

Please sign in to comment.