mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
API change: add MemorySwap to KubeletConfiguration
This commit is contained in:
parent
9eeec68d67
commit
bda03b4818
@ -209,6 +209,7 @@ var (
|
|||||||
"MaxOpenFiles",
|
"MaxOpenFiles",
|
||||||
"MaxPods",
|
"MaxPods",
|
||||||
"MemoryManagerPolicy",
|
"MemoryManagerPolicy",
|
||||||
|
"MemorySwap.SwapBehavior",
|
||||||
"NodeLeaseDurationSeconds",
|
"NodeLeaseDurationSeconds",
|
||||||
"NodeStatusMaxImages",
|
"NodeStatusMaxImages",
|
||||||
"NodeStatusUpdateFrequency.Duration",
|
"NodeStatusUpdateFrequency.Duration",
|
||||||
|
@ -58,6 +58,7 @@ makeIPTablesUtilChains: true
|
|||||||
maxOpenFiles: 1000000
|
maxOpenFiles: 1000000
|
||||||
maxPods: 110
|
maxPods: 110
|
||||||
memoryManagerPolicy: None
|
memoryManagerPolicy: None
|
||||||
|
memorySwap: {}
|
||||||
nodeLeaseDurationSeconds: 40
|
nodeLeaseDurationSeconds: 40
|
||||||
nodeStatusMaxImages: 50
|
nodeStatusMaxImages: 50
|
||||||
nodeStatusReportFrequency: 5m0s
|
nodeStatusReportFrequency: 5m0s
|
||||||
|
@ -58,6 +58,7 @@ makeIPTablesUtilChains: true
|
|||||||
maxOpenFiles: 1000000
|
maxOpenFiles: 1000000
|
||||||
maxPods: 110
|
maxPods: 110
|
||||||
memoryManagerPolicy: None
|
memoryManagerPolicy: None
|
||||||
|
memorySwap: {}
|
||||||
nodeLeaseDurationSeconds: 40
|
nodeLeaseDurationSeconds: 40
|
||||||
nodeStatusMaxImages: 50
|
nodeStatusMaxImages: 50
|
||||||
nodeStatusReportFrequency: 5m0s
|
nodeStatusReportFrequency: 5m0s
|
||||||
|
@ -326,6 +326,10 @@ type KubeletConfiguration struct {
|
|||||||
FeatureGates map[string]bool
|
FeatureGates map[string]bool
|
||||||
// Tells the Kubelet to fail to start if swap is enabled on the node.
|
// Tells the Kubelet to fail to start if swap is enabled on the node.
|
||||||
FailSwapOn bool
|
FailSwapOn bool
|
||||||
|
// Configure swap memory available to container workloads.
|
||||||
|
// +featureGate=NodeSwapEnabled
|
||||||
|
// +optional
|
||||||
|
MemorySwap MemorySwapConfiguration
|
||||||
// A quantity defines the maximum size of the container log file before it is rotated. For example: "5Mi" or "256Ki".
|
// A quantity defines the maximum size of the container log file before it is rotated. For example: "5Mi" or "256Ki".
|
||||||
ContainerLogMaxSize string
|
ContainerLogMaxSize string
|
||||||
// Maximum number of container log files that can be present for a container.
|
// Maximum number of container log files that can be present for a container.
|
||||||
@ -568,3 +572,10 @@ type MemoryReservation struct {
|
|||||||
NumaNode int32
|
NumaNode int32
|
||||||
Limits v1.ResourceList
|
Limits v1.ResourceList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MemorySwapConfiguration struct {
|
||||||
|
// Configure swap memory available to container workloads. May be one of
|
||||||
|
// "", "NoSwap": workloads cannot use swap
|
||||||
|
// "UnlimitedSwap": workloads can use unlimited swap, up to the allocatable limit.
|
||||||
|
SwapBehavior string
|
||||||
|
}
|
||||||
|
@ -752,6 +752,10 @@ type KubeletConfiguration struct {
|
|||||||
// Default: true
|
// Default: true
|
||||||
// +optional
|
// +optional
|
||||||
FailSwapOn *bool `json:"failSwapOn,omitempty"`
|
FailSwapOn *bool `json:"failSwapOn,omitempty"`
|
||||||
|
// Configure swap memory available to container workloads.
|
||||||
|
// +featureGate=NodeSwapEnabled
|
||||||
|
// +optional
|
||||||
|
MemorySwap MemorySwapConfiguration `json:"memorySwap,omitempty"`
|
||||||
// containerLogMaxSize is a quantity defining the maximum size of the container log
|
// containerLogMaxSize is a quantity defining the maximum size of the container log
|
||||||
// file before it is rotated. For example: "5Mi" or "256Ki".
|
// file before it is rotated. For example: "5Mi" or "256Ki".
|
||||||
// Dynamic Kubelet Config (beta): If dynamically updating this field, consider that
|
// Dynamic Kubelet Config (beta): If dynamically updating this field, consider that
|
||||||
@ -1035,3 +1039,10 @@ type MemoryReservation struct {
|
|||||||
NumaNode int32 `json:"numaNode"`
|
NumaNode int32 `json:"numaNode"`
|
||||||
Limits v1.ResourceList `json:"limits"`
|
Limits v1.ResourceList `json:"limits"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configure swap memory available to container workloads. May be one of
|
||||||
|
// "", "NoSwap": workloads cannot use swap
|
||||||
|
// "UnlimitedSwap": workloads can use unlimited swap, up to the allocatable limit.
|
||||||
|
type MemorySwapConfiguration struct {
|
||||||
|
SwapBehavior string `json:"swapBehavior,omitempty"`
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user