Commit Graph

23 Commits

Author SHA1 Message Date
caozhiyuan
1a59bcb142 add validation test for RegisterWithTaints 2021-12-08 10:36:43 +08:00
shuheiktgw
2acdaeb361 Refactor Kubelet config validation tests 2021-11-18 22:38:01 +09:00
Shiming Zhang
7a6f792ff3 Add validation for GracefulNodeShutdownBasedOnPodPriority
Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
2021-11-17 11:47:12 +08:00
Elana Hashman
642eff0c69
Rename NodeSwapEnabled flag to NodeSwap 2021-07-09 11:39:52 -07:00
Li Bo
c3d9b10ca8 feature: support Memory QoS for cgroups v2 2021-07-08 09:26:46 +08:00
Elana Hashman
39f32d7286
Ensure MemorySwapConfig can't be set without feature flag 2021-06-29 12:08:25 -07:00
Elana Hashman
d3fd1362ca
Rename NoSwap to LimitedSwap as workloads may still swap
Also made the options a kubelet type, address API review feedback
2021-06-29 12:08:21 -07:00
Elana Hashman
7342acb0b8
Add validation for KubeletConfig MemorySwap 2021-06-29 11:59:01 -07:00
Mengjiao Liu
af825b4357 Remove default JSON logging format registration from component-base/logs package 2021-06-24 20:37:09 +08:00
Marek Siarkowicz
f9343f837d Use LoggingConfig within LogOptions
Co-authored-by: mengjiao.liu <mengjiao.liu@daocloud.io>
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Co-authored-by: Heisenberg <yuzhiquanlong@gmail.com>
2021-06-15 17:14:43 +02:00
chenyw1990
edff740386 fix json log format panic, change the flag names in flagIsSet 2021-03-09 14:14:25 +08:00
David Porter
893f5fd4f0 Promote kubelet graceful node shutdown to beta
- Change the feature gate from alpha to beta and enable it by default

- Update a few of the unit tests due to feature gate being enabled by
  default

- Small refactor in `nodeshutdown_manager` which adds `featureEnabled`
  function (which checks that feature gate and that
  `kubeletConfig.ShutdownGracePeriod > 0`).

- Use `featureEnabled()` to exit early from shutdown manager in the case
  that the feature is disabled

- Update kubelet config defaulting to be explicit that
  `ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods` default to
  zero and update the godoc comments.

- Update defaults and add featureGate tag in api config godoc.

With this feature now in beta and the feature gate enabled by default,
to enable graceful shutdown all that will be required is to configure
`ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods` in the
kubelet config. If not configured, they will be defaulted to zero, and
graceful shutdown will effectively be disabled.
2021-03-05 15:21:37 -08:00
David Porter
16f71c6d47 Implement shutdown manager in kubelet
Implements KEP 2000, Graceful Node Shutdown:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2000-graceful-node-shutdown

* Add new FeatureGate `GracefulNodeShutdown` to control
enabling/disabling the feature
* Add two new KubeletConfiguration options
  * `ShutdownGracePeriod` and `ShutdownGracePeriodCriticalPods`
* Add new package, `nodeshutdown` that implements the Node shutdown
manager
  * The node shutdown manager uses the systemd inhibit package, to
  create an system inhibitor, monitor for node shutdown events, and
  gracefully terminate pods upon a node shutdown.
2020-11-12 21:47:55 +00:00
Krzysztof Wiatrzyk
ec552e6dc6 Add flag value validation of TopologyManagerPolicy
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
Krzysztof Wiatrzyk
a05eead211 Add flag value validation of TopologyManagerScope
Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
Karan Goel
a49760bfce Non-zero cfs quota period duration requires feature flag 2020-09-11 08:00:05 -07:00
nolancon
1e613e5a4c Update TopologyManager Feature Gate:
- Alpha to Beta.
- True by default.
- Remove redundant validation checks.
2020-03-02 03:32:05 +00:00
Jianzhu Zhang
89dfd24483 added --reserved-cpus kubelet command option 2019-11-06 07:33:52 -05:00
nolancon
705f97e171 Enable feature gate and kubelet flags for Topology Manager
Nit: remove capitalization of preferred
Remove line from kubelet and add to separate PR for easier merge

nit: dependency added to separate PR

Add check to ensure strict policy cannot be set without feature gate enabled

Topology Manager runs "none" policy by default.

Added constants for policies and updated documentation.
2019-07-02 06:50:17 +01:00
tianshapjq
362f7e2a09 validate if systemReservedCgroup and kubeReservedCgroup compliance with enforNodeAllocatable 2018-09-12 15:17:03 +08:00
Sandor Szücs
588d2808b7
fix #51135 make CFS quota period configurable, adds a cli flag and config option to kubelet to be able to set cpu.cfs_period and defaults to 100ms as before.
It requires to enable feature gate CustomCPUCFSQuotaPeriod.

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2018-09-01 20:19:59 +02:00
Lucas Käldström
7a840cb4c8
automated: Rename all package references 2018-08-29 19:07:52 +03:00
Lucas Käldström
62bfe29ce4
automated, boring: Rename pkg/kubelet/apis/{kubelet,}config 2018-08-29 18:59:05 +03:00