Skip to content

Commit

Permalink
Add more feedback from reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Mar 13, 2024
1 parent 4374166 commit c970b6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions internal/mode/static/telemetry/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,11 @@ func collectClusterInformation(ctx context.Context, k8sClient client.Reader) (cl
}
node := nodes.Items[0]

clusterInfo.Version = "unknown"
kubeletVersion := node.Status.NodeInfo.KubeletVersion
version, err := k8sversion.ParseGeneric(kubeletVersion)
if err == nil {
if err != nil {
clusterInfo.Version = "unknown"
} else {
clusterInfo.Version = version.String()
}

Expand Down
2 changes: 1 addition & 1 deletion internal/mode/static/telemetry/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func getPlatform(node v1.Node, namespaces v1.NamespaceList) string {

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

Expand Down

0 comments on commit c970b6b

Please sign in to comment.