mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
KEP-4603: Node specific kubelet config for maximum backoff down to 1 second (#128374)
* Add feature gate, API, and conflict validation tests for enablecrashloopbackoffmax Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Handle when current base is longer than node max Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Update pkg/features/kube_features.go Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com> * Fix indentation Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Follow convention for success test Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Normalize casing, and change field to Duration Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Fix json name and some other casing errors Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Another one I missed before Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Don't clobber global max function Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Change to flat value in defaults.go Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Streamline validation and defaults Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Fix typecheck Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Lint Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Tighten up validation for subsecond values Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Rename field from MaxBackOffPeriod to MaxContainerRestartPeriod Signed-off-by: Laura Lorenz <lauralorenz@google.com> * A few missed references to renames Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Only compare flags in flags test Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Don't mess with SetDefault signature Nobody messes with SetDefault signature Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Fix stale signature change, and update test data Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Inspect current feature gates at defaulting time Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Don't use the global feature gate for temp usage Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Expose default error, and some comments Signed-off-by: Laura Lorenz <lauralorenz@google.com> * Hint fuzzer for less arbitrary values to FeatureGates Signed-off-by: Laura Lorenz <lauralorenz@google.com> --------- Signed-off-by: Laura Lorenz <lauralorenz@google.com> Co-authored-by: Tsubasa Nagasawa <toversus2357@gmail.com>
This commit is contained in:
30
pkg/generated/openapi/zz_generated.openapi.go
generated
30
pkg/generated/openapi/zz_generated.openapi.go
generated
@@ -1239,6 +1239,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
|
||||
"k8s.io/kubelet/config/v1alpha1.CredentialProvider": schema_k8sio_kubelet_config_v1alpha1_CredentialProvider(ref),
|
||||
"k8s.io/kubelet/config/v1alpha1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1alpha1_CredentialProviderConfig(ref),
|
||||
"k8s.io/kubelet/config/v1alpha1.ExecEnvVar": schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref),
|
||||
"k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig": schema_k8sio_kubelet_config_v1beta1_CrashLoopBackOffConfig(ref),
|
||||
"k8s.io/kubelet/config/v1beta1.CredentialProvider": schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref),
|
||||
"k8s.io/kubelet/config/v1beta1.CredentialProviderConfig": schema_k8sio_kubelet_config_v1beta1_CredentialProviderConfig(ref),
|
||||
"k8s.io/kubelet/config/v1beta1.ExecEnvVar": schema_k8sio_kubelet_config_v1beta1_ExecEnvVar(ref),
|
||||
@@ -63468,6 +63469,26 @@ func schema_k8sio_kubelet_config_v1alpha1_ExecEnvVar(ref common.ReferenceCallbac
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_kubelet_config_v1beta1_CrashLoopBackOffConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"object"},
|
||||
Properties: map[string]spec.Schema{
|
||||
"maxContainerRestartPeriod": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "maxContainerRestartPeriod is the maximum duration the backoff delay can accrue to for container restarts, minimum 1 second, maximum 300 seconds. If not set, defaults to the internal crashloopbackoff maximum (300s).",
|
||||
Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Duration"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_k8sio_kubelet_config_v1beta1_CredentialProvider(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
@@ -64596,6 +64617,13 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
||||
},
|
||||
},
|
||||
},
|
||||
"crashLoopBackOff": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "CrashLoopBackOff contains config to modify node-level parameters for container restart behavior",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig"),
|
||||
},
|
||||
},
|
||||
"reservedMemory": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "reservedMemory specifies a comma-separated list of memory reservations for NUMA nodes. The parameter makes sense only in the context of the memory manager feature. The memory manager will not allocate reserved memory for container workloads. For example, if you have a NUMA0 with 10Gi of memory and the reservedMemory was specified to reserve 1Gi of memory at NUMA0, the memory manager will assume that only 9Gi is available for allocation. You can specify a different amount of NUMA node and memory types. You can omit this parameter at all, but you should be aware that the amount of reserved memory from all NUMA nodes should be equal to the amount of memory specified by the [node allocatable](https://kubernetes.io/docs/tasks/administer-cluster/reserve-compute-resources/#node-allocatable). If at least one node allocatable parameter has a non-zero value, you will need to specify at least one NUMA node. Also, avoid specifying:\n\n1. Duplicates, the same NUMA node, and memory type, but with a different value. 2. zero limits for any memory type. 3. NUMAs nodes IDs that do not exist under the machine. 4. memory types except for memory and hugepages-<size>\n\nDefault: nil",
|
||||
@@ -64699,7 +64727,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"k8s.io/api/core/v1.Taint", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/logs/api/v1.LoggingConfiguration", "k8s.io/component-base/tracing/api/v1.TracingConfiguration", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration", "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority"},
|
||||
"k8s.io/api/core/v1.Taint", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration", "k8s.io/component-base/logs/api/v1.LoggingConfiguration", "k8s.io/component-base/tracing/api/v1.TracingConfiguration", "k8s.io/kubelet/config/v1beta1.CrashLoopBackOffConfig", "k8s.io/kubelet/config/v1beta1.KubeletAuthentication", "k8s.io/kubelet/config/v1beta1.KubeletAuthorization", "k8s.io/kubelet/config/v1beta1.MemoryReservation", "k8s.io/kubelet/config/v1beta1.MemorySwapConfiguration", "k8s.io/kubelet/config/v1beta1.ShutdownGracePeriodByPodPriority"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user