Skip to content

Commit 34a6981

Browse files
committed
cgroup v1 updates from mrunal
1 parent 23c6068 commit 34a6981

File tree

1 file changed

+24
-28
lines changed
  • keps/sig-node/5573-cgroup-v1-unsupported

1 file changed

+24
-28
lines changed

keps/sig-node/5573-cgroup-v1-unsupported/README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [Documentation updates](#documentation-updates)
2222
- [Testing of cgroup v1](#testing-of-cgroup-v1)
2323
- [Removal of cgroup v1](#removal-of-cgroup-v1)
24+
- [Meaning of deprecation](#meaning-of-deprecation)
2425
- [Test Plan](#test-plan)
2526
- [Prerequisite testing updates](#prerequisite-testing-updates)
2627
- [Unit tests](#unit-tests)
@@ -83,24 +84,24 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
8384

8485
## Summary
8586

86-
Remove cgroup v1 support from Kubernetes codebase, building upon the maintenance mode introduced in KEP-4569. This enhancement will remove cgroup v1 support.
87+
Remove cgroup v1 support from Kubernetes codebase, building upon the maintenance mode introduced in KEP-4569.
8788

8889
This KEP will have a phased approach where beta will prevent kubelet from starting on a cgroup v1 node.
8990

90-
We will commit to removing cgroup v1 code but there is not yet a timeline for removal.
91+
We will commit to removing cgroup v1 code but there is not yet a timeline for removal.
9192
The removal will be done no earlier than 1.38 to maintain the k8s deprecation policy.
9293

9394
## Motivation
9495

95-
Following the transition of cgroup v1 support to maintenance mode in KEP-4569, the next logical step is to move cgroup v1 to an unsupported state. This aligns with the broader ecosystem's migration to cgroup v2, including major Linux distributions and the Linux kernel community's focus on cgroup v2 for new features and improvements.
96+
Following the transition of cgroup v1 support to maintenance mode in KEP-4569, the next logical step is to move cgroup v1 to a deprecated state. This aligns with the broader ecosystem's migration to cgroup v2, including major Linux distributions and the Linux kernel community's focus on cgroup v2 for new features and improvements.
9697

9798
The motivation builds on the rationale established in KEP-4569:
9899

99100
- The Linux kernel community has made cgroup v2 the focus for new features
100101
- systemd announced deprecation 1.5 years ago in [v256](https://github.com/systemd/systemd/releases/tag/v256) and [removal](https://github.com/systemd/systemd/releases/tag/v258). Other critical components are moving beyond cgroup v1
101102
- cgroup v2 offers better functionality, more consistent interfaces, and improved scalability
102103

103-
By removing cgroup v1, Kubernetes provides a clear signal to the community about the removal path and encourages migration to the more secure and efficient cgroup v2 technology.
104+
The goal of this enhancement would be to eventually remove cgroup v1 related code once the timeline is figured out.
104105

105106
### Linux Community Momentum
106107

@@ -144,9 +145,9 @@ The latest release of debian "Trixie" is using [systemd 257](https://packages.de
144145

145146
1. **Disable cgroup v1 support by default**: Set the kubelet flag `FailCgroupV1` to `true` by default, effectively making cgroup v1 unsupported unless explicitly enabled.
146147

147-
2. **Clear messaging**: Update warning messages and events to reflect that cgroup v1 is now unsupported rather than in maintenance mode.
148+
2. **Clear messaging**: Update warning messages and events to reflect that cgroup v1 is now deprecated rather than in maintenance mode.
148149

149-
3. **Documentation updates**: Update all relevant documentation to reflect the unsupported status of cgroup v1 and provide migration guidance.
150+
3. **Documentation updates**: Update all relevant documentation to reflect the deprecated status of cgroup v1 and provide migration guidance.
150151

151152
4. **Preparation for removal**: This change prepares the codebase for eventual removal of cgroup v1 support in future releases.
152153

@@ -179,6 +180,7 @@ The primary risks involve potential disruptions for users who have not yet migra
179180
- Third-party monitoring and security agents need to support cgroup v2
180181

181182
**Mitigations**:
183+
182184
- Provide comprehensive migration documentation and guidance
183185
- Change the KubeletConfig field FailCgroupV1 to false.
184186
- Clear warning messages when cgroup v1 is detected
@@ -196,12 +198,14 @@ This enhancement primarily involves configuration changes and messaging updates,
196198
The key technical change is to modify the default value of the kubelet config api `FailCgroupV1` from `false` to `true`. This change will be implemented in the kubelet configuration types.
197199

198200
Current behavior:
201+
199202
```go
200203
// Default: false (cgroup v1 support enabled by default)
201204
FailCgroupV1: false,
202205
```
203206

204207
Proposed behavior:
208+
205209
```go
206210
// Default: true (cgroup v1 support disabled by default)
207211
FailCgroupV1: true,
@@ -212,11 +216,13 @@ FailCgroupV1: true,
212216
Update the warning messages and events introduced in KEP-4569 to reflect the new unsupported status:
213217

214218
From (maintenance mode):
219+
215220
```golang
216221
klog.Warning("cgroup v1 detected. cgroup v1 support has been transitioned into maintenance mode, please plan for the migration towards cgroup v2. More information at https://git.k8s.io/enhancements/keps/sig-node/4569-cgroup-v1-maintenance-mode")
217222
```
218223

219224
To (deprecated):
225+
220226
```golang
221227
klog.Warning("cgroup v1 detected. cgroup v1 support is deprecated and will be removed in a future release. Please migrate to cgroup v2. More information at https://git.k8s.io/enhancements/keps/sig-node/5573-cgroup-v1-unsupported")
222228
```
@@ -226,6 +232,7 @@ Similar updates will be made to corresponding events.
226232
### Documentation updates
227233

228234
Update all relevant documentation across the Kubernetes ecosystem:
235+
229236
- Kubernetes.io documentation
230237
- Kubelet configuration documentation
231238
- Migration guides
@@ -246,6 +253,17 @@ Once all supported releases of Kubernetes have `FailCGroupV1` set to true, we ca
246253
In this section, we should call the places where we are going to remove cgroup v1.
247254
</UNRESOLVED>
248255

256+
### Meaning of deprecation
257+
258+
Kubernetes will continue to test and verify no regressions appear in the following [job](https://testgrid.k8s.io/sig-node-containerd#cos-cgroupv1-containerd-node-e2e).
259+
260+
Until cgroup v1 removal happens in the code base, this job will continue to be maintained and supported.
261+
262+
If there are any regressions caused by code in this lane, the Kubernetes community will treat that as a regression
263+
and this would be a candidate for cherry-picks.
264+
265+
CGroup v1 related features or UX improvements are not in scope since cgroup v1 is deprecated.
266+
249267
### Test Plan
250268

251269
<!--
@@ -275,13 +293,6 @@ All existing cgroup v2 test jobs must continue to pass. Tests should verify that
275293

276294
##### Unit tests
277295

278-
<!--
279-
In principle every added code should have complete unit test coverage, so providing
280-
the exact set of tests will not bring additional value.
281-
However, if complete unit test coverage is not possible, explain the reason of it
282-
together with explanation why this is acceptable.
283-
-->
284-
285296
Unit tests should cover:
286297

287298
- Default configuration values
@@ -291,25 +302,10 @@ Unit tests should cover:
291302

292303
##### Integration tests
293304

294-
<!--
295-
This question should be filled when targeting a release.
296-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
297-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
298-
https://storage.googleapis.com/k8s-triage/index.html
299-
-->
300-
301305
Integration tests will verify the end-to-end behavior of the configuration changes and ensure proper interaction between kubelet components.
302306

303307
##### e2e tests
304308

305-
<!--
306-
This question should be filled when targeting a release.
307-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
308-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
309-
https://storage.googleapis.com/k8s-triage/index.html
310-
We expect no non-infra related flakes in the last month as a GA graduation criteria.
311-
-->
312-
313309
1. Continue monitoring cgroup v2 CI jobs to ensure stability
314310
2. Add specific tests for the new default behavior
315311
3. Ensure all new tests use cgroup v2 hosts

0 commit comments

Comments
 (0)