diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 43c8c635d51..9336642f089 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -8476,7 +8476,7 @@ "type": "string" }, "kubeProxyVersion": { - "description": "KubeProxy Version reported by the node.", + "description": "Deprecated: KubeProxy Version reported by the node.", "type": "string" }, "kubeletVersion": { diff --git a/api/openapi-spec/v3/api__v1_openapi.json b/api/openapi-spec/v3/api__v1_openapi.json index ad18cda2c8f..02b7b18f24f 100644 --- a/api/openapi-spec/v3/api__v1_openapi.json +++ b/api/openapi-spec/v3/api__v1_openapi.json @@ -4062,7 +4062,7 @@ }, "kubeProxyVersion": { "default": "", - "description": "KubeProxy Version reported by the node.", + "description": "Deprecated: KubeProxy Version reported by the node.", "type": "string" }, "kubeletVersion": { diff --git a/pkg/features/kube_features.go b/pkg/features/kube_features.go index abc5bb91c6c..4dda97a108b 100644 --- a/pkg/features/kube_features.go +++ b/pkg/features/kube_features.go @@ -207,6 +207,7 @@ const ( // owner: @HirazawaUi // kep: http://kep.k8s.io/4004 // alpha: v1.29 + // beta: v1.31 // DisableNodeKubeProxyVersion disable the status.nodeInfo.kubeProxyVersion field of v1.Node DisableNodeKubeProxyVersion featuregate.Feature = "DisableNodeKubeProxyVersion" @@ -1028,7 +1029,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS DisableKubeletCloudCredentialProviders: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, - DisableNodeKubeProxyVersion: {Default: false, PreRelease: featuregate.Alpha}, + DisableNodeKubeProxyVersion: {Default: true, PreRelease: featuregate.Beta}, DevicePluginCDIDevices: {Default: true, PreRelease: featuregate.Beta}, diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index e95c94f5859..fbad1d19b37 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -24977,7 +24977,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo }, "kubeProxyVersion": { SchemaProps: spec.SchemaProps{ - Description: "KubeProxy Version reported by the node.", + Description: "Deprecated: KubeProxy Version reported by the node.", Default: "", Type: []string{"string"}, Format: "", diff --git a/pkg/kubelet/kubelet_node_status_test.go b/pkg/kubelet/kubelet_node_status_test.go index 69376e9f0e9..3a4db819069 100644 --- a/pkg/kubelet/kubelet_node_status_test.go +++ b/pkg/kubelet/kubelet_node_status_test.go @@ -291,7 +291,7 @@ func TestUpdateNewNodeStatus(t *testing.T) { Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), + KubeProxyVersion: "", }, Capacity: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), @@ -471,7 +471,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) { Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), + KubeProxyVersion: "", }, Capacity: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), @@ -677,7 +677,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) { Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), + KubeProxyVersion: "", }, Capacity: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), @@ -908,7 +908,7 @@ func TestUpdateNodeStatusWithLease(t *testing.T) { Architecture: goruntime.GOARCH, ContainerRuntimeVersion: "test://1.5.0", KubeletVersion: version.Get().String(), - KubeProxyVersion: version.Get().String(), + KubeProxyVersion: "", }, Capacity: v1.ResourceList{ v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI), diff --git a/staging/src/k8s.io/api/core/v1/generated.proto b/staging/src/k8s.io/api/core/v1/generated.proto index 2435bc0802e..5316bcb5511 100644 --- a/staging/src/k8s.io/api/core/v1/generated.proto +++ b/staging/src/k8s.io/api/core/v1/generated.proto @@ -2816,7 +2816,7 @@ message NodeSystemInfo { // Kubelet Version reported by the node. optional string kubeletVersion = 7; - // KubeProxy Version reported by the node. + // Deprecated: KubeProxy Version reported by the node. optional string kubeProxyVersion = 8; // The Operating System reported by the node diff --git a/staging/src/k8s.io/api/core/v1/types.go b/staging/src/k8s.io/api/core/v1/types.go index 59fd2eb5dba..b6ce90e2b83 100644 --- a/staging/src/k8s.io/api/core/v1/types.go +++ b/staging/src/k8s.io/api/core/v1/types.go @@ -5814,7 +5814,7 @@ type NodeSystemInfo struct { ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"` // Kubelet Version reported by the node. KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"` - // KubeProxy Version reported by the node. + // Deprecated: KubeProxy Version reported by the node. KubeProxyVersion string `json:"kubeProxyVersion" protobuf:"bytes,8,opt,name=kubeProxyVersion"` // The Operating System reported by the node OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"` diff --git a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go index f7ec62e090f..746c14704b2 100644 --- a/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go +++ b/staging/src/k8s.io/api/core/v1/types_swagger_doc_generated.go @@ -1307,7 +1307,7 @@ var map_NodeSystemInfo = map[string]string{ "osImage": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", "containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).", "kubeletVersion": "Kubelet Version reported by the node.", - "kubeProxyVersion": "KubeProxy Version reported by the node.", + "kubeProxyVersion": "Deprecated: KubeProxy Version reported by the node.", "operatingSystem": "The Operating System reported by the node", "architecture": "The Architecture reported by the node", } diff --git a/test/e2e/cloud/gcp/common/upgrade_mechanics.go b/test/e2e/cloud/gcp/common/upgrade_mechanics.go index 75ff89ec09a..d75f900fb96 100644 --- a/test/e2e/cloud/gcp/common/upgrade_mechanics.go +++ b/test/e2e/cloud/gcp/common/upgrade_mechanics.go @@ -252,16 +252,18 @@ func checkNodesVersions(ctx context.Context, cs clientset.Interface, want string } for _, n := range l.Items { // We do prefix trimming and then matching because: - // want looks like: 0.19.3-815-g50e67d4 - // kv/kvp look like: v0.19.3-815-g50e67d4034e858-dirty + // want looks like: 0.19.3-815-g50e67d4 + // kv look like: v0.19.3-815-g50e67d4034e858-dirty + // kpv look like: v0.19.3-815-g50e67d4034e858-dirty or empty value kv, kpv := strings.TrimPrefix(n.Status.NodeInfo.KubeletVersion, "v"), - strings.TrimPrefix(n.Status.NodeInfo.KubeProxyVersion, "v") + strings.TrimPrefix(n.Status.NodeInfo.KubeProxyVersion, "v") //nolint:staticcheck // Keep testing deprecated KubeProxyVersion field until it's being removed if !strings.HasPrefix(kv, want) { return fmt.Errorf("node %s had kubelet version %s which does not start with %s", n.ObjectMeta.Name, kv, want) } - if !strings.HasPrefix(kpv, want) { - return fmt.Errorf("node %s had kube-proxy version %s which does not start with %s", + + if len(kpv) != 0 || !strings.HasPrefix(kpv, want) { + return fmt.Errorf("node %s had kube-proxy version %s which does not start with %s or is not empty value", n.ObjectMeta.Name, kpv, want) } }