Skip to content

Commit c970b6b

Browse files
committed
Add more feedback from reviews
1 parent 4374166 commit c970b6b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

internal/mode/static/telemetry/collector.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,11 @@ func collectClusterInformation(ctx context.Context, k8sClient client.Reader) (cl
292292
}
293293
node := nodes.Items[0]
294294

295-
clusterInfo.Version = "unknown"
296295
kubeletVersion := node.Status.NodeInfo.KubeletVersion
297296
version, err := k8sversion.ParseGeneric(kubeletVersion)
298-
if err == nil {
297+
if err != nil {
298+
clusterInfo.Version = "unknown"
299+
} else {
299300
clusterInfo.Version = version.String()
300301
}
301302

internal/mode/static/telemetry/platform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func getPlatform(node v1.Node, namespaces v1.NamespaceList) string {
6969

7070
func openShiftExtractor(state k8sState) string {
7171
// openshift platform won't show up in node's ProviderID
72-
if value, ok := state.node.Labels[openshiftIdentifier]; ok && value != "" {
72+
if state.node.Labels[openshiftIdentifier] != "" {
7373
return platformOpenShift
7474
}
7575

0 commit comments

Comments
 (0)