From 04f29dbd265a1db2fc4cc52d25892cbc84781acc Mon Sep 17 00:00:00 2001 From: Bradley Jones Date: Wed, 28 Aug 2024 14:08:38 +0100 Subject: [PATCH] feat: remove kubeproxy from node information This field was deprecated in k8s 1.31 as it does not accurately represent the running version of kube proxy on a node. Deprecation notice https://kubernetes.io/blog/2024/07/19/kubernetes-1-31-upcoming-changes/#deprecation-of-status-nodeinfo-kubeproxyversion-field-for-nodes-kep-4004-https-github-com-kubernetes-enhancements-issues-4004 More information can be seen here: https://github.com/kubernetes/kubernetes/issues/117756 Signed-off-by: Bradley Jones --- pkg/inventory/nodes.go | 2 -- pkg/inventory/nodes_test.go | 6 ------ 2 files changed, 8 deletions(-) diff --git a/pkg/inventory/nodes.go b/pkg/inventory/nodes.go index 8074afb..35b6b34 100644 --- a/pkg/inventory/nodes.go +++ b/pkg/inventory/nodes.go @@ -41,7 +41,6 @@ func FetchNodes(c client.Client, batchSize, timeout int64, includeAnnotations, i Arch: n.Status.NodeInfo.Architecture, ContainerRuntimeVersion: n.Status.NodeInfo.ContainerRuntimeVersion, KernelVersion: n.Status.NodeInfo.KernelVersion, - KubeProxyVersion: n.Status.NodeInfo.KubeProxyVersion, KubeletVersion: n.Status.NodeInfo.KubeletVersion, Labels: labels, OperatingSystem: n.Status.NodeInfo.OperatingSystem, @@ -53,7 +52,6 @@ func FetchNodes(c client.Client, batchSize, timeout int64, includeAnnotations, i Arch: n.Status.NodeInfo.Architecture, ContainerRuntimeVersion: n.Status.NodeInfo.ContainerRuntimeVersion, KernelVersion: n.Status.NodeInfo.KernelVersion, - KubeProxyVersion: n.Status.NodeInfo.KubeProxyVersion, KubeletVersion: n.Status.NodeInfo.KubeletVersion, OperatingSystem: n.Status.NodeInfo.OperatingSystem, } diff --git a/pkg/inventory/nodes_test.go b/pkg/inventory/nodes_test.go index 14cea0e..eb9bcc9 100644 --- a/pkg/inventory/nodes_test.go +++ b/pkg/inventory/nodes_test.go @@ -45,7 +45,6 @@ func TestFetchNodes(t *testing.T) { Architecture: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", }, @@ -71,7 +70,6 @@ func TestFetchNodes(t *testing.T) { Arch: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", }, @@ -97,7 +95,6 @@ func TestFetchNodes(t *testing.T) { Architecture: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", }, @@ -117,7 +114,6 @@ func TestFetchNodes(t *testing.T) { Arch: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", }, @@ -145,7 +141,6 @@ func TestFetchNodes(t *testing.T) { Architecture: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", }, @@ -165,7 +160,6 @@ func TestFetchNodes(t *testing.T) { Arch: "arm64", ContainerRuntimeVersion: "docker://20.10.23", KernelVersion: "5.15.49-linuxkit", - KubeProxyVersion: "v1.26.1", KubeletVersion: "v1.26.1", OperatingSystem: "linux", Annotations: map[string]string{