Skip to content

Commit

Permalink
Add small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjee19 committed Mar 7, 2024
1 parent 8849fe4 commit b806aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions internal/mode/static/telemetry/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ func CollectClusterID(ctx context.Context, k8sClient client.Reader) (string, err
return string(kubeNamespace.GetUID()), nil
}

// CollectNodeList returns a NodeList of all the Nodes in the cluster.
func CollectNodeList(ctx context.Context, k8sClient client.Reader) (v1.NodeList, error) {
var nodes v1.NodeList
if err := k8sClient.List(ctx, &nodes); err != nil {
Expand Down
3 changes: 1 addition & 2 deletions pkg/telemetry/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ func isMultiplePlatforms(node v1.Node, namespaces v1.NamespaceList) string {
// where if either the label/annotation or providerID changes it will mess this up and may group more clusters in
// the "Other" platform if they messed with any of the node labels/annotations.

// I think it will be fine just to do the providerID check as

func isOpenshiftPlatform(node v1.Node) bool {
// openshift platform won't show up in node's ProviderID
value, ok := node.Labels[openshiftIdentifier]
Expand Down Expand Up @@ -96,5 +94,6 @@ func isRancherPlatform(namespaces v1.NamespaceList) bool {
return true
}
}

return false
}

0 comments on commit b806aab

Please sign in to comment.