Repository: kubernetes/kubernetes (language: go)

Issue:
EvictionPressureTransitionPeriod will silently default 0s to 5m
### What happened?

EvictionPressureTransitionPeriod will silently overwrite user specfied values of 0s.

### What did you expect to happen?

We should have API documentation and website documentation that 0s is not allowed for this and will be overriden to 5 m.

### How can we reproduce it (as minimally and precisely as possible)?

Use EvictionPressureTransitionPeriod of 0s and it will actually default to 5m.

### Anything else we need to know?

https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/apis/config/v1beta1/defaults.go#L236-#L238

### Kubernetes version

All

### Cloud provider

All

### OS version

NA

### Install tools

NA

### Container runtime (CRI) and version (if applicable)

NA

### Related plugins (CNI, CSI, ...) and versions (if applicable)

NA


Discussion / hints:
/remove-kind bug
/kind documentation
/sig node

Fix patch:
diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go
index 77d6c6798f307..77ecbebb014d3 100644
--- a/pkg/generated/openapi/zz_generated.openapi.go
+++ b/pkg/generated/openapi/zz_generated.openapi.go
@@ -64326,7 +64326,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
 					},
 					"evictionPressureTransitionPeriod": {
 						SchemaProps: spec.SchemaProps{
-							Description: "evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. Default: \"5m\"",
+							Description: "evictionPressureTransitionPeriod is the duration for which the kubelet has to wait before transitioning out of an eviction pressure condition. A duration of 0s will be converted to the default value of 5m Default: \"5m\"",
 							Ref:         ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
 						},
 					},
diff --git a/staging/src/k8s.io/kubelet/config/v1beta1/types.go b/staging/src/k8s.io/kubelet/config/v1beta1/types.go
index e5ac2d18f5a3d..12f0bcae623a3 100644
--- a/staging/src/k8s.io/kubelet/config/v1beta1/types.go
+++ b/staging/src/k8s.io/kubelet/config/v1beta1/types.go
@@ -530,6 +530,7 @@ type KubeletConfiguration struct {
 	EvictionSoftGracePeriod map[string]string `json:"evictionSoftGracePeriod,omitempty"`
 	// evictionPressureTransitionPeriod is the duration for which the kubelet has to wait
 	// before transitioning out of an eviction pressure condition.
+	// A duration of 0s will be converted to the default value of 5m
 	// Default: "5m"
 	// +optional
 	EvictionPressureTransitionPeriod metav1.Duration `json:"evictionPressureTransitionPeriod,omitempty"`


Test patch: