mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
Merge pull request #24559 from derekwaynecarr/eviction_flags
Automatic merge from submit-queue Add kubelet flags for eviction threshold configuration This PR just adds the flags for kubelet eviction and the associated generated code. I am happy to tweak text, but we can also do that later at this point in the release. Since this causes codegen, I wanted to stage this first. /cc @vishh @kubernetes/sig-node
This commit is contained in:
commit
3a19ad7908
@ -254,4 +254,7 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
|
|||||||
fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node")
|
fs.StringVar(&s.NodeIP, "node-ip", s.NodeIP, "IP address of the node. If set, kubelet will use this IP address for the node")
|
||||||
fs.BoolVar(&s.EnableCustomMetrics, "enable-custom-metrics", s.EnableCustomMetrics, "Support for gathering custom metrics.")
|
fs.BoolVar(&s.EnableCustomMetrics, "enable-custom-metrics", s.EnableCustomMetrics, "Support for gathering custom metrics.")
|
||||||
fs.StringVar(&s.RuntimeCgroups, "runtime-cgroups", s.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.")
|
fs.StringVar(&s.RuntimeCgroups, "runtime-cgroups", s.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.")
|
||||||
|
fs.StringVar(&s.EvictionHard, "eviction-hard", s.EvictionHard, "A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction.")
|
||||||
|
fs.StringVar(&s.EvictionSoft, "eviction-soft", s.EvictionSoft, "A set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a pod eviction.")
|
||||||
|
fs.StringVar(&s.EvictionSoftGracePeriod, "eviction-soft-grace-period", s.EvictionSoftGracePeriod, "A set of eviction grace periods (e.g. memory.available=1m30s) that correspond to how long a soft eviction threshold must hold before triggering a pod eviction.")
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,9 @@ kubelet
|
|||||||
--enable-server[=true]: Enable the Kubelet's server
|
--enable-server[=true]: Enable the Kubelet's server
|
||||||
--event-burst=10: Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0
|
--event-burst=10: Maximum size of a bursty event records, temporarily allows event records to burst to this number, while still not exceeding event-qps. Only used if --event-qps > 0
|
||||||
--event-qps=5: If > 0, limit event creations per second to this value. If 0, unlimited.
|
--event-qps=5: If > 0, limit event creations per second to this value. If 0, unlimited.
|
||||||
|
--eviction-hard="": A set of eviction thresholds (e.g. memory.available<1Gi) that if met would trigger a pod eviction.
|
||||||
|
--eviction-soft="": A set of eviction thresholds (e.g. memory.available<1.5Gi) that if met over a corresponding grace period would trigger a pod eviction.
|
||||||
|
--eviction-soft-grace-period="": A set of eviction grace periods (e.g. memory.available=1m30s) that correspond to how long a soft eviction threshold must hold before triggering a pod eviction.
|
||||||
--experimental-flannel-overlay[=false]: Experimental support for starting the kubelet with the default overlay network (flannel). Assumes flanneld is already running in client mode. [default=false]
|
--experimental-flannel-overlay[=false]: Experimental support for starting the kubelet with the default overlay network (flannel). Assumes flanneld is already running in client mode. [default=false]
|
||||||
--file-check-frequency=20s: Duration between checking config files for new data
|
--file-check-frequency=20s: Duration between checking config files for new data
|
||||||
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
|
--google-json-key="": The Google Cloud Platform Service Account JSON Key to use for authentication.
|
||||||
|
@ -116,6 +116,9 @@ etcd-servers-overrides
|
|||||||
event-burst
|
event-burst
|
||||||
event-qps
|
event-qps
|
||||||
event-ttl
|
event-ttl
|
||||||
|
eviction-hard
|
||||||
|
eviction-soft
|
||||||
|
eviction-soft-grace-period
|
||||||
executor-bindall
|
executor-bindall
|
||||||
executor-logv
|
executor-logv
|
||||||
executor-path
|
executor-path
|
||||||
|
@ -302,6 +302,9 @@ func DeepCopy_componentconfig_KubeletConfiguration(in KubeletConfiguration, out
|
|||||||
}
|
}
|
||||||
out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
|
out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
|
||||||
out.EnableCustomMetrics = in.EnableCustomMetrics
|
out.EnableCustomMetrics = in.EnableCustomMetrics
|
||||||
|
out.EvictionHard = in.EvictionHard
|
||||||
|
out.EvictionSoft = in.EvictionSoft
|
||||||
|
out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -341,6 +341,12 @@ type KubeletConfiguration struct {
|
|||||||
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
||||||
// enable gathering custom metrics.
|
// enable gathering custom metrics.
|
||||||
EnableCustomMetrics bool `json:"enableCustomMetrics"`
|
EnableCustomMetrics bool `json:"enableCustomMetrics"`
|
||||||
|
// Comma-delimited list of hard eviction expressions. For example, 'memory.available<300Mi'.
|
||||||
|
EvictionHard string `json:"evictionHard,omitempty"`
|
||||||
|
// Comma-delimited list of soft eviction expressions. For example, 'memory.available<300Mi'.
|
||||||
|
EvictionSoft string `json:"evictionSoft,omitempty"`
|
||||||
|
// Comma-delimeted list of grace periods for each soft eviction signal. For example, 'memory.available=30s'.
|
||||||
|
EvictionSoftGracePeriod string `json:"evictionSoftGracePeriod,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type KubeSchedulerConfiguration struct {
|
type KubeSchedulerConfiguration struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user