Skip to content
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
12 changes: 7 additions & 5 deletions npm/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ func start(config npmconfig.Config, flags npmconfig.Flags) error {
}),
)
}
k8sServerVersion := k8sServerVersion(clientset)

err = metrics.CreateTelemetryHandle(config.NPMVersion(), version, npm.GetAIMetadata())
if err != nil {
klog.Infof("CreateTelemetryHandle failed with error %v. AITelemetry is not initialized.", err)
}

var dp dataplane.GenericDataplane
stopChannel := wait.NeverStop
Expand Down Expand Up @@ -197,11 +201,9 @@ func start(config npmconfig.Config, flags npmconfig.Flags) error {
}
dp.RunPeriodicTasks()
}

k8sServerVersion := k8sServerVersion(clientset)
npMgr := npm.NewNetworkPolicyManager(config, factory, podFactory, dp, exec.New(), version, k8sServerVersion)
err = metrics.CreateTelemetryHandle(config.NPMVersion(), version, npm.GetAIMetadata())
if err != nil {
klog.Infof("CreateTelemetryHandle failed with error %v. AITelemetry is not initialized.", err)
}

go restserver.NPMRestServerListenAndServe(config, npMgr)

Expand Down
Loading