From b806aab7ec7e74e9375a6d480a7e44b48ad862d2 Mon Sep 17 00:00:00 2001 From: Benjamin Jee Date: Wed, 6 Mar 2024 16:33:14 -0800 Subject: [PATCH] Add small fixes --- internal/mode/static/telemetry/collector.go | 1 + pkg/telemetry/platform.go | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/mode/static/telemetry/collector.go b/internal/mode/static/telemetry/collector.go index a44fade5d..699397882 100644 --- a/internal/mode/static/telemetry/collector.go +++ b/internal/mode/static/telemetry/collector.go @@ -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 { diff --git a/pkg/telemetry/platform.go b/pkg/telemetry/platform.go index a6f583662..4dcff8f20 100644 --- a/pkg/telemetry/platform.go +++ b/pkg/telemetry/platform.go @@ -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] @@ -96,5 +94,6 @@ func isRancherPlatform(namespaces v1.NamespaceList) bool { return true } } + return false }