mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Add eviction-pressure-transition-period flag to kubelet
This commit is contained in:
@@ -117,30 +117,31 @@ func NewKubeletServer() *KubeletServer {
|
||||
OOMScoreAdj: int32(qos.KubeletOOMScoreAdj),
|
||||
LockFilePath: "",
|
||||
PodInfraContainerImage: GetDefaultPodInfraContainerImage(),
|
||||
Port: ports.KubeletPort,
|
||||
ReadOnlyPort: ports.KubeletReadOnlyPort,
|
||||
RegisterNode: true, // will be ignored if no apiserver is configured
|
||||
RegisterSchedulable: true,
|
||||
RegistryBurst: 10,
|
||||
RegistryPullQPS: 5.0,
|
||||
KubeletCgroups: "",
|
||||
ResolverConfig: kubetypes.ResolvConfDefault,
|
||||
RktPath: "",
|
||||
RktAPIEndpoint: rkt.DefaultRktAPIServiceEndpoint,
|
||||
RktStage1Image: "",
|
||||
RootDirectory: defaultRootDir,
|
||||
RuntimeCgroups: "",
|
||||
SerializeImagePulls: true,
|
||||
StreamingConnectionIdleTimeout: unversioned.Duration{Duration: 4 * time.Hour},
|
||||
SyncFrequency: unversioned.Duration{Duration: 1 * time.Minute},
|
||||
SystemCgroups: "",
|
||||
ReconcileCIDR: true,
|
||||
KubeAPIQPS: 5.0,
|
||||
KubeAPIBurst: 10,
|
||||
ExperimentalFlannelOverlay: experimentalFlannelOverlay,
|
||||
OutOfDiskTransitionFrequency: unversioned.Duration{Duration: 5 * time.Minute},
|
||||
HairpinMode: componentconfig.PromiscuousBridge,
|
||||
BabysitDaemons: false,
|
||||
Port: ports.KubeletPort,
|
||||
ReadOnlyPort: ports.KubeletReadOnlyPort,
|
||||
RegisterNode: true, // will be ignored if no apiserver is configured
|
||||
RegisterSchedulable: true,
|
||||
RegistryBurst: 10,
|
||||
RegistryPullQPS: 5.0,
|
||||
KubeletCgroups: "",
|
||||
ResolverConfig: kubetypes.ResolvConfDefault,
|
||||
RktPath: "",
|
||||
RktAPIEndpoint: rkt.DefaultRktAPIServiceEndpoint,
|
||||
RktStage1Image: "",
|
||||
RootDirectory: defaultRootDir,
|
||||
RuntimeCgroups: "",
|
||||
SerializeImagePulls: true,
|
||||
StreamingConnectionIdleTimeout: unversioned.Duration{Duration: 4 * time.Hour},
|
||||
SyncFrequency: unversioned.Duration{Duration: 1 * time.Minute},
|
||||
SystemCgroups: "",
|
||||
ReconcileCIDR: true,
|
||||
KubeAPIQPS: 5.0,
|
||||
KubeAPIBurst: 10,
|
||||
ExperimentalFlannelOverlay: experimentalFlannelOverlay,
|
||||
OutOfDiskTransitionFrequency: unversioned.Duration{Duration: 5 * time.Minute},
|
||||
HairpinMode: componentconfig.PromiscuousBridge,
|
||||
BabysitDaemons: false,
|
||||
EvictionPressureTransitionPeriod: unversioned.Duration{Duration: 5 * time.Minute},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -255,4 +256,5 @@ func (s *KubeletServer) AddFlags(fs *pflag.FlagSet) {
|
||||
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.")
|
||||
fs.DurationVar(&s.EvictionPressureTransitionPeriod.Duration, "eviction-pressure-transition-period", s.EvictionPressureTransitionPeriod.Duration, "Duration for which the kubelet has to wait before transitioning out of an eviction pressure condition.")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user