mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #123845 from HirazawaUi/promote-DisableNodeKubeProxyVersion-to-beta
promote DisableNodeKubeProxyVersion feature gate to beta
This commit is contained in:
commit
1af6bc992c
2
api/openapi-spec/swagger.json
generated
2
api/openapi-spec/swagger.json
generated
@ -8476,7 +8476,7 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kubeProxyVersion": {
|
"kubeProxyVersion": {
|
||||||
"description": "KubeProxy Version reported by the node.",
|
"description": "Deprecated: KubeProxy Version reported by the node.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kubeletVersion": {
|
"kubeletVersion": {
|
||||||
|
@ -4062,7 +4062,7 @@
|
|||||||
},
|
},
|
||||||
"kubeProxyVersion": {
|
"kubeProxyVersion": {
|
||||||
"default": "",
|
"default": "",
|
||||||
"description": "KubeProxy Version reported by the node.",
|
"description": "Deprecated: KubeProxy Version reported by the node.",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"kubeletVersion": {
|
"kubeletVersion": {
|
||||||
|
@ -207,6 +207,7 @@ const (
|
|||||||
// owner: @HirazawaUi
|
// owner: @HirazawaUi
|
||||||
// kep: http://kep.k8s.io/4004
|
// kep: http://kep.k8s.io/4004
|
||||||
// alpha: v1.29
|
// alpha: v1.29
|
||||||
|
// beta: v1.31
|
||||||
// DisableNodeKubeProxyVersion disable the status.nodeInfo.kubeProxyVersion field of v1.Node
|
// DisableNodeKubeProxyVersion disable the status.nodeInfo.kubeProxyVersion field of v1.Node
|
||||||
DisableNodeKubeProxyVersion featuregate.Feature = "DisableNodeKubeProxyVersion"
|
DisableNodeKubeProxyVersion featuregate.Feature = "DisableNodeKubeProxyVersion"
|
||||||
|
|
||||||
@ -1028,7 +1029,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
|
|
||||||
DisableKubeletCloudCredentialProviders: {Default: true, PreRelease: featuregate.GA, LockToDefault: true},
|
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},
|
DevicePluginCDIDevices: {Default: true, PreRelease: featuregate.Beta},
|
||||||
|
|
||||||
|
2
pkg/generated/openapi/zz_generated.openapi.go
generated
2
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -24977,7 +24977,7 @@ func schema_k8sio_api_core_v1_NodeSystemInfo(ref common.ReferenceCallback) commo
|
|||||||
},
|
},
|
||||||
"kubeProxyVersion": {
|
"kubeProxyVersion": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "KubeProxy Version reported by the node.",
|
Description: "Deprecated: KubeProxy Version reported by the node.",
|
||||||
Default: "",
|
Default: "",
|
||||||
Type: []string{"string"},
|
Type: []string{"string"},
|
||||||
Format: "",
|
Format: "",
|
||||||
|
@ -291,7 +291,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
|
|||||||
Architecture: goruntime.GOARCH,
|
Architecture: goruntime.GOARCH,
|
||||||
ContainerRuntimeVersion: "test://1.5.0",
|
ContainerRuntimeVersion: "test://1.5.0",
|
||||||
KubeletVersion: version.Get().String(),
|
KubeletVersion: version.Get().String(),
|
||||||
KubeProxyVersion: version.Get().String(),
|
KubeProxyVersion: "",
|
||||||
},
|
},
|
||||||
Capacity: v1.ResourceList{
|
Capacity: v1.ResourceList{
|
||||||
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
||||||
@ -471,7 +471,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) {
|
|||||||
Architecture: goruntime.GOARCH,
|
Architecture: goruntime.GOARCH,
|
||||||
ContainerRuntimeVersion: "test://1.5.0",
|
ContainerRuntimeVersion: "test://1.5.0",
|
||||||
KubeletVersion: version.Get().String(),
|
KubeletVersion: version.Get().String(),
|
||||||
KubeProxyVersion: version.Get().String(),
|
KubeProxyVersion: "",
|
||||||
},
|
},
|
||||||
Capacity: v1.ResourceList{
|
Capacity: v1.ResourceList{
|
||||||
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
||||||
@ -677,7 +677,7 @@ func TestUpdateNodeStatusWithRuntimeStateError(t *testing.T) {
|
|||||||
Architecture: goruntime.GOARCH,
|
Architecture: goruntime.GOARCH,
|
||||||
ContainerRuntimeVersion: "test://1.5.0",
|
ContainerRuntimeVersion: "test://1.5.0",
|
||||||
KubeletVersion: version.Get().String(),
|
KubeletVersion: version.Get().String(),
|
||||||
KubeProxyVersion: version.Get().String(),
|
KubeProxyVersion: "",
|
||||||
},
|
},
|
||||||
Capacity: v1.ResourceList{
|
Capacity: v1.ResourceList{
|
||||||
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
||||||
@ -908,7 +908,7 @@ func TestUpdateNodeStatusWithLease(t *testing.T) {
|
|||||||
Architecture: goruntime.GOARCH,
|
Architecture: goruntime.GOARCH,
|
||||||
ContainerRuntimeVersion: "test://1.5.0",
|
ContainerRuntimeVersion: "test://1.5.0",
|
||||||
KubeletVersion: version.Get().String(),
|
KubeletVersion: version.Get().String(),
|
||||||
KubeProxyVersion: version.Get().String(),
|
KubeProxyVersion: "",
|
||||||
},
|
},
|
||||||
Capacity: v1.ResourceList{
|
Capacity: v1.ResourceList{
|
||||||
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
v1.ResourceCPU: *resource.NewMilliQuantity(2000, resource.DecimalSI),
|
||||||
|
@ -2816,7 +2816,7 @@ message NodeSystemInfo {
|
|||||||
// Kubelet Version reported by the node.
|
// Kubelet Version reported by the node.
|
||||||
optional string kubeletVersion = 7;
|
optional string kubeletVersion = 7;
|
||||||
|
|
||||||
// KubeProxy Version reported by the node.
|
// Deprecated: KubeProxy Version reported by the node.
|
||||||
optional string kubeProxyVersion = 8;
|
optional string kubeProxyVersion = 8;
|
||||||
|
|
||||||
// The Operating System reported by the node
|
// The Operating System reported by the node
|
||||||
|
@ -5814,7 +5814,7 @@ type NodeSystemInfo struct {
|
|||||||
ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"`
|
ContainerRuntimeVersion string `json:"containerRuntimeVersion" protobuf:"bytes,6,opt,name=containerRuntimeVersion"`
|
||||||
// Kubelet Version reported by the node.
|
// Kubelet Version reported by the node.
|
||||||
KubeletVersion string `json:"kubeletVersion" protobuf:"bytes,7,opt,name=kubeletVersion"`
|
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"`
|
KubeProxyVersion string `json:"kubeProxyVersion" protobuf:"bytes,8,opt,name=kubeProxyVersion"`
|
||||||
// The Operating System reported by the node
|
// The Operating System reported by the node
|
||||||
OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"`
|
OperatingSystem string `json:"operatingSystem" protobuf:"bytes,9,opt,name=operatingSystem"`
|
||||||
|
@ -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)).",
|
"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).",
|
"containerRuntimeVersion": "ContainerRuntime Version reported by the node through runtime remote API (e.g. containerd://1.4.2).",
|
||||||
"kubeletVersion": "Kubelet Version reported by the node.",
|
"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",
|
"operatingSystem": "The Operating System reported by the node",
|
||||||
"architecture": "The Architecture reported by the node",
|
"architecture": "The Architecture reported by the node",
|
||||||
}
|
}
|
||||||
|
@ -252,16 +252,18 @@ func checkNodesVersions(ctx context.Context, cs clientset.Interface, want string
|
|||||||
}
|
}
|
||||||
for _, n := range l.Items {
|
for _, n := range l.Items {
|
||||||
// We do prefix trimming and then matching because:
|
// We do prefix trimming and then matching because:
|
||||||
// want looks like: 0.19.3-815-g50e67d4
|
// want looks like: 0.19.3-815-g50e67d4
|
||||||
// kv/kvp look like: v0.19.3-815-g50e67d4034e858-dirty
|
// 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"),
|
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) {
|
if !strings.HasPrefix(kv, want) {
|
||||||
return fmt.Errorf("node %s had kubelet version %s which does not start with %s",
|
return fmt.Errorf("node %s had kubelet version %s which does not start with %s",
|
||||||
n.ObjectMeta.Name, kv, want)
|
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)
|
n.ObjectMeta.Name, kpv, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user