diff --git a/pkg/api/reporting/types/types.go b/pkg/api/reporting/types/types.go index 527d741e85..ec8ac91333 100644 --- a/pkg/api/reporting/types/types.go +++ b/pkg/api/reporting/types/types.go @@ -11,7 +11,7 @@ type ReportingInfo struct { KurlNodeCountReady int `json:"kurl_node_count_ready"` K8sVersion string `json:"k8s_version"` K8sDistribution string `json:"k8s_distribution"` - KOTSVersion string `json:"kots_version"` + UserAgent string `json:"user_agent"` KOTSInstallID string `json:"kots_install_id"` KURLInstallID string `json:"kurl_install_id"` IsGitOpsEnabled bool `json:"is_gitops_enabled"` diff --git a/pkg/reporting/app.go b/pkg/reporting/app.go index 11675278f9..744e8f35ce 100644 --- a/pkg/reporting/app.go +++ b/pkg/reporting/app.go @@ -182,7 +182,7 @@ func GetReportingInfo(appID string) *types.ReportingInfo { InstanceID: appID, KOTSInstallID: os.Getenv("KOTS_INSTALL_ID"), KURLInstallID: os.Getenv("KURL_INSTALL_ID"), - KOTSVersion: buildversion.Version(), + UserAgent: buildversion.GetUserAgent(), } clientset, err := k8sutil.GetClientset() diff --git a/pkg/reporting/app_airgap.go b/pkg/reporting/app_airgap.go index 216935453a..2f31072d0d 100644 --- a/pkg/reporting/app_airgap.go +++ b/pkg/reporting/app_airgap.go @@ -54,7 +54,7 @@ func GetInstanceReport(licenseID string, reportingInfo *types.ReportingInfo) *In KurlNodeCountReady: reportingInfo.KurlNodeCountReady, K8sVersion: reportingInfo.K8sVersion, K8sDistribution: reportingInfo.K8sDistribution, - KotsVersion: reportingInfo.KOTSVersion, + UserAgent: reportingInfo.UserAgent, KotsInstallID: reportingInfo.KOTSInstallID, KurlInstallID: reportingInfo.KURLInstallID, IsGitOpsEnabled: reportingInfo.IsGitOpsEnabled, diff --git a/pkg/reporting/instance_report.go b/pkg/reporting/instance_report.go index f1271d1ae3..8c2eb06701 100644 --- a/pkg/reporting/instance_report.go +++ b/pkg/reporting/instance_report.go @@ -24,7 +24,7 @@ type InstanceReportEvent struct { KurlNodeCountReady int `json:"kurl_node_count_ready"` K8sVersion string `json:"k8s_version"` K8sDistribution string `json:"k8s_distribution,omitempty"` - KotsVersion string `json:"kots_version"` + UserAgent string `json:"user_agent"` KotsInstallID string `json:"kots_install_id,omitempty"` KurlInstallID string `json:"kurl_install_id,omitempty"` IsGitOpsEnabled bool `json:"is_gitops_enabled"` diff --git a/pkg/reporting/preflight_airgap.go b/pkg/reporting/preflight_airgap.go index a6018d8823..cdad45749b 100644 --- a/pkg/reporting/preflight_airgap.go +++ b/pkg/reporting/preflight_airgap.go @@ -32,7 +32,7 @@ func (r *AirgapReporter) SubmitPreflightData(license *kotsv1beta1.License, appID IsCLI: isCLI, PreflightStatus: preflightStatus, AppStatus: appStatus, - KotsVersion: buildversion.Version(), + UserAgent: buildversion.GetUserAgent(), }, }, } diff --git a/pkg/reporting/preflight_report.go b/pkg/reporting/preflight_report.go index 9b4a521d9c..f8b918cde0 100644 --- a/pkg/reporting/preflight_report.go +++ b/pkg/reporting/preflight_report.go @@ -24,7 +24,7 @@ type PreflightReportEvent struct { IsCLI bool `json:"is_cli"` PreflightStatus string `json:"preflight_status"` AppStatus string `json:"app_status"` - KotsVersion string `json:"kots_version"` + UserAgent string `json:"user_agent"` } func (r *PreflightReport) GetType() ReportType { diff --git a/pkg/reporting/report_test.go b/pkg/reporting/report_test.go index b6c46d3bc8..6cd8f53462 100644 --- a/pkg/reporting/report_test.go +++ b/pkg/reporting/report_test.go @@ -30,7 +30,7 @@ func Test_EncodeDecodeAirgapReport(t *testing.T) { KurlNodeCountReady: 3, K8sVersion: "1.28.0", K8sDistribution: "kurl", - KotsVersion: "1.100.0", + UserAgent: "KOTS/1.100.0", KotsInstallID: "test-kots-install-id", KurlInstallID: "test-kurl-install-id", IsGitOpsEnabled: true, @@ -71,7 +71,7 @@ func Test_EncodeDecodeAirgapReport(t *testing.T) { IsCLI: true, PreflightStatus: "pass", AppStatus: "ready", - KotsVersion: "1.100.0", + UserAgent: "KOTS/1.100.0", }, }, } @@ -101,7 +101,7 @@ func Test_CreateReportEvent(t *testing.T) { KurlNodeCountReady: 3, K8sVersion: "1.28.0", K8sDistribution: "kurl", - KotsVersion: "1.100.0", + UserAgent: "KOTS/1.100.0", KotsInstallID: "test-kots-install-id", KurlInstallID: "test-kurl-install-id", IsGitOpsEnabled: true, @@ -134,7 +134,7 @@ func Test_CreateReportEvent(t *testing.T) { IsCLI: true, PreflightStatus: "pass", AppStatus: "ready", - KotsVersion: "1.100.0", + UserAgent: "KOTS/1.100.0", }, }, }