mirror of https://github.com/k3s-io/k3s
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-nodepull/6/head
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.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.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
|
||||
--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.
|
||||
--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]
|
||||
--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.
|
||||
|
|
|
@ -116,6 +116,9 @@ etcd-servers-overrides
|
|||
event-burst
|
||||
event-qps
|
||||
event-ttl
|
||||
eviction-hard
|
||||
eviction-soft
|
||||
eviction-soft-grace-period
|
||||
executor-bindall
|
||||
executor-logv
|
||||
executor-path
|
||||
|
|
|
@ -302,6 +302,9 @@ func DeepCopy_componentconfig_KubeletConfiguration(in KubeletConfiguration, out
|
|||
}
|
||||
out.NonMasqueradeCIDR = in.NonMasqueradeCIDR
|
||||
out.EnableCustomMetrics = in.EnableCustomMetrics
|
||||
out.EvictionHard = in.EvictionHard
|
||||
out.EvictionSoft = in.EvictionSoft
|
||||
out.EvictionSoftGracePeriod = in.EvictionSoftGracePeriod
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -341,6 +341,12 @@ type KubeletConfiguration struct {
|
|||
NonMasqueradeCIDR string `json:"nonMasqueradeCIDR"`
|
||||
// enable gathering custom metrics.
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue