diff --git a/npm/npm.go b/npm/npm.go index 32c4ec400..74db53e8e 100644 --- a/npm/npm.go +++ b/npm/npm.go @@ -16,7 +16,6 @@ import ( "github.com/Azure/azure-container-networking/npm/ipsm" "github.com/Azure/azure-container-networking/npm/metrics" "github.com/Azure/azure-container-networking/npm/util" - "github.com/Azure/azure-container-networking/telemetry" "k8s.io/apimachinery/pkg/version" "k8s.io/client-go/informers" coreinformers "k8s.io/client-go/informers/core/v1" @@ -63,7 +62,6 @@ type NetworkPolicyManager struct { ipsMgr *ipsm.IpsetManager npmNamespaceCache *npmNamespaceCache // Azure-specific variables - clusterState telemetry.ClusterState k8sServerVersion *version.Info NodeName string version string @@ -83,15 +81,10 @@ func NewNetworkPolicyManager(informerFactory informers.SharedInformerFactory, ex npInformer: informerFactory.Networking().V1().NetworkPolicies(), ipsMgr: ipsm.NewIpsetManager(exec), npmNamespaceCache: &npmNamespaceCache{nsMap: make(map[string]*Namespace)}, - clusterState: telemetry.ClusterState{ - PodCount: 0, - NsCount: 0, - NwPolicyCount: 0, - }, - k8sServerVersion: k8sServerVersion, - NodeName: os.Getenv("HOSTNAME"), - version: npmVersion, - TelemetryEnabled: true, + k8sServerVersion: k8sServerVersion, + NodeName: os.Getenv("HOSTNAME"), + version: npmVersion, + TelemetryEnabled: true, } // create pod controller diff --git a/telemetry/telemetry.go b/telemetry/telemetry.go index 429c2c3bc..ec6ced319 100644 --- a/telemetry/telemetry.go +++ b/telemetry/telemetry.go @@ -104,29 +104,6 @@ type AIMetric struct { Metric aitelemetry.Metric } -// ClusterState contains the current kubernetes cluster state. -type ClusterState struct { - PodCount int - NsCount int - NwPolicyCount int -} - -// NPMReport structure. -type NPMReport struct { - IsNewInstance bool - ClusterID string - NodeName string - InstanceName string - NpmVersion string - KubernetesVersion string - ErrorMessage string - EventMessage string - UpTime string - Timestamp string - ClusterState ClusterState - Metadata common.Metadata `json:"compute"` -} - // ReportManager structure. type ReportManager struct { HostNetAgentURL string @@ -143,15 +120,6 @@ func (report *CNIReport) GetReport(name string, version string, ipamQueryURL str report.GetOSDetails() } -// GetReport retrives npm and kubernetes cluster related info and create a report structure. -func (report *NPMReport) GetReport(clusterID, nodeName, npmVersion, kubernetesVersion string, clusterState ClusterState) { - report.ClusterID = clusterID - report.NodeName = nodeName - report.NpmVersion = npmVersion - report.KubernetesVersion = kubernetesVersion - report.ClusterState = clusterState -} - // SendReport will send telemetry report to HostNetAgent. func (reportMgr *ReportManager) SendReport(tb *TelemetryBuffer) error { var err error