You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,36 +61,38 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
61
61
62
62
In Kubernetes, `NodeLifecycleController` applies predefined `NoExecute` taints (e.g., `Unreachable`, `NotReady`) when the nodes are determined to be unhealthy. After the nodes get tainted, `TaintManager` does its due diligence to start deleting running pods on those nodes based on `NoExecute` taints, which can be added by anyone.
63
63
64
-
In this KEP, we propose to decouple `TaintManager` that performs taint-based pod eviction from `NodeLifecycleController` and make them two separate controllers: `NodeLifecycleController` to add taints to unhealthy nodes and `TaintManager` to perform pod deletion on nodes tainted with NoExecute effect.
64
+
In this KEP, we propose to decouple `TaintManager` that performs taint-based pod eviction from `NodeLifecycleController` and make them two separate controllers: `NodeLifecycleController` to add taints to unhealthy nodes and `TaintEvictionController` to perform pod deletion on nodes tainted with NoExecute effect.
65
65
66
-
This separation not only improves code organization but also makes it easier to improve `TaintManager` or build custom `TaintManager`.
66
+
This separation not only improves code organization but also makes it easier to improve `TaintEvictionController` or build custom implementations of the taint based eviction.
67
67
68
68
## Motivation
69
-
`NodeLifecycleController` combines two independent functions:
70
-
* Adding a pre-defined set of `NoExecute` taints to nodes based on the node conditions
69
+
`NodeLifecycleController` combines two independent functions:
70
+
* Adding a pre-defined set of `NoExecute` taints to nodes based on the node conditions
71
71
* Performing pod eviction on `NoExecute` taints
72
72
73
73
Splitting the `NodeLifecycleController` based on the above functionalities will help to disentangle code and make future extensions to either component manageable.
74
74
75
75
### Goals
76
76
77
-
* Move taint-based eviction implementation out of `NodeLifecycleController` into a separate and independent taint-manager to enhance separation of concerns, maintainability.
77
+
* Move taint-based eviction implementation out of `NodeLifecycleController` into a separate and independent taint-manager to enhance separation of concerns, maintainability.
78
78
79
79
### Non-Goals
80
80
81
-
The main focus of the KEP is on the separation of concerns between `NodeLifecycleController` and `TaintManager`, which will improve code organization and enable future extensions to `TaintManager`. While it is true that the separation allows cluster operators to build custom `TaintManager` and disable the default `TaintManager`, this is a side-effect of the change rather than the main goal. the KEP emphasizes the benefits of the separation of concerns and briefly mention the option to disable the default TaintManager as a potential side-effect.
81
+
The main focus of the KEP is on the separation of concerns between `NodeLifecycleController` and `TaintEvictionController`, which will improve code organization and enable future extensions to `TaintEvictionController`. While it is true that the separation allows cluster operators to build custom `TaintEvictionController` and disable the default `TaintEvictionController`, this is a side-effect of the change rather than the main goal. the KEP emphasizes the benefits of the separation of concerns and briefly mention the option to disable the default TaintEvictionController as a potential side-effect.
82
+
83
+
82
84
83
85
The non-goals are the following.
84
86
* Introduce extra maintenance burden or regression after the code reorganization
85
-
* Introduce incompatible behavior of `NodeLifecycleController` or `TaintManager`
87
+
* Introduce incompatible behavior of `NodeLifecycleController` or `TaintEvictionController`
86
88
* Extend and enhance the current built-in APIs for customization of node taint-based eviction, including additional fields, more flexible communication protocols, webhooks and CRD references, etc.
87
-
* Actual extension and enhancement of the current `TaintManager`.
89
+
* Actual extension and enhancement of the current `TaintEvictionController`.
88
90
89
91
## Proposal
90
92
91
93
### User Stories (Optional)
92
94
93
-
While this split is for improving the code maintainability, an effect of this change is that it allows cluster-admins to extend and enhance the default `TaintManager` and even replace the default `TaintManager` with a custom implementation. However, discussing such use-cases for extending `TaintManager` or writing custom `TaintManager` is beyond the scope of this KEP.
95
+
While this split is for improving the code maintainability, an effect of this change is that it allows cluster-admins to extend and enhance the default `TaintEvictionController` and even replace the default `TaintEvictionController` with a custom implementation. However, discussing such use-cases for extending `TaintEvictionController` or writing custom `TaintEvictionController` is beyond the scope of this KEP.
94
96
95
97
#### Story
96
98
@@ -100,7 +102,7 @@ While this split is for improving the code maintainability, an effect of this ch
100
102
101
103
Compared with a single combined controller, the risks of using two separate controllers include the following.
102
104
* Slightly increase the communication overhead from applying node taints to performing pod eviction.
103
-
* Make cancellation of pod eviction and un-tainting nodes harder.
105
+
* Make cancellation of pod eviction and un-tainting nodes harder.
104
106
105
107
However, the performance overhead of the split controllers is expected to be small, and pod eviction cancellation and un-tainting nodes are not common use cases. Splitting `NodeLifecycleController` is more beneficial by promoting a cleaner design and enhancing the overall maintainability and extensibility in the long term.
106
108
@@ -114,20 +116,20 @@ In Kubernetes version 1.27 and earlier, the `NoExecuteTaintManager` component is
114
116
115
117
The proposed design refactors `NodeLifecycleController` into two independent controllers, which are managed by `kube-controller-manager`.
116
118
117
-
1.`NodeLifecycleController` monitors node health and adds `NotReady` and `Unreachable` taints to nodes
118
-
2.`NoExecuteTaintManager` watches for node and pod updates, and performs `NoExecute` taint based pod eviction
119
+
1.`NodeLifecycleController` monitors node health and adds `NotReady` and `Unreachable` taints to nodes
120
+
2.`TaintEvictionController` watches for node and pod updates, and performs `NoExecute` taint based pod eviction
119
121
120
-
The existing kube-controller-manager flag `--controllers` can be used to optionally disable the `NoExecuteTaintManager`.
122
+
The existing kube-controller-manager flag `--controllers` can be used to optionally disable the `TaintEvictionController`.
121
123
122
124

123
125
124
126
### Implementation
125
127
126
128
A new `NodeLifecycleManager` is implemented by removing taint-manager related code from `controller/nodelifecycle/node_lifecycle_controller.go`.
127
129
128
-
A new `NoExecuteTaintManager` is created as a top-level controller managed by` kube-controller-manager`. Its implementation is based on the current taint-manager from `controller/nodelifecycle/taint-manager.go`.
130
+
A new `TaintEvictionController` is created as a top-level controller managed by` kube-controller-manager`. Its implementation is based on the current taint-manager from `controller/nodelifecycle/taint-manager.go`.
129
131
130
-
The creation and startup of the default taint-manager is performed by `kube-controller-manager`. A feature gate `SeparateTaintManager` controls whether to use the split `TaintManager` or roll back to the old `NodeLifecycleController`.
132
+
The creation and startup of the default taint-manager is performed by `kube-controller-manager`. A feature gate `SeparateTaintEvictionController` controls whether to use the split `TaintEvictionController` or roll back to the old `NodeLifecycleController`.
131
133
132
134
### Test Plan
133
135
@@ -139,22 +141,22 @@ Kubernetes already has a good coverage of node `No-Execute` eviction. We will ad
- Verify the ability to enable and disable the default `TaintManager`.
153
-
- Verify the new `TaintManager`to act on node taints properly.
154
+
- Verify the ability to enable and disable the default `TaintEvictionController`.
155
+
- Verify the new `TaintEvictionController`to act on node taints properly.
154
156
155
157
##### E2E tests
156
-
- Verify the new controllers to pass the existing E2E and conformance tests using the split `TaintManager`.
157
-
- Manually test rollback and the `upgrade->downgrade->upgrade` path to verify it can pass the existing e2e tests.
158
+
- Verify the new controllers to pass the existing E2E and conformance tests using the split `TaintEvictionController`.
159
+
- Manually test rollback and the `upgrade->downgrade->upgrade` path to verify it can pass the existing e2e tests.
158
160
159
161
### Graduation Criteria
160
162
@@ -164,7 +166,7 @@ Since there are no new API changes, we can skip Alpha and go to Beta directly.
164
166
165
167
#### Beta
166
168
167
-
* Support `kube-controller-manager` flag `--controllers=-taint-manager` to disable the default taint-manager.
169
+
* Support `kube-controller-manager` flag `--controllers=-taint-eviction-controller` to disable the default `TaintEvictionController`.
168
170
* Unit and e2e tests completed and passed.
169
171
* Performance and scalability tests to verify there is non-negligible performance degradation in node taint-based eviction.
170
172
* Update documents to reflect the changes.
@@ -175,7 +177,7 @@ Since there are no new API changes, we can skip Alpha and go to Beta directly.
175
177
176
178
### Upgrade / Downgrade Strategy
177
179
178
-
A feature gate `SeparateTaintManager` enables and disables the new feature. When the feature is turned on, a user can use `kube-controller-manager`'s flag to disable the default `TaintManager`.
180
+
A feature gate `SeparateTaintEvictionController` enables and disables the new feature. When the feature is turned on, a user can use `kube-controller-manager`'s flag to disable the default `TaintEvictionController`.
179
181
180
182
### Version Skew Strategy
181
183
@@ -186,14 +188,14 @@ A feature gate `SeparateTaintManager` enables and disables the new feature. Whe
186
188
###### How can this feature be enabled / disabled in a live cluster?
187
189
188
190
-[X] Feature gate (also fill in values in `kep.yaml`)
- Components depending on the feature gate: kube-controller-manager
191
193
192
194
###### Does enabling the feature change any default behavior?
193
-
No, the default `NodeLifecycleManager` and `TaintManager` behavior will stay the same.
195
+
No, the default `NodeLifecycleManager` and `TaintEvictionController` behavior will stay the same.
194
196
195
197
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
196
-
Yes. Once rolled back, `TaintManager` is enabled along with `NodeLifecycleController`.
198
+
Yes. Once rolled back, `TaintEvictionController` is enabled along with `NodeLifecycleController`.
197
199
198
200
###### What happens if we reenable the feature if it was previously rolled back?
199
201
The feature will work as usual.
@@ -215,28 +217,28 @@ A significantly changing number of pod evictions (`taint_manager_pod_evictions_t
215
217
216
218
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
217
219
The upgrade will be tested in the planned unit and e2e tests. The rollback and upgrade-downgrade-upgrade path will
218
-
be tested manually (see [Test Plan](#test-plan) section).
220
+
be tested manually (see [Test Plan](#test-plan) section).
219
221
220
222
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
221
223
No
222
224
223
225
### Monitoring Requirements
224
226
225
227
###### How can an operator determine if the feature is in use by workloads?
226
-
It can be determined by if the feature gate `SeparateTaintManager` is used or not.
228
+
It can be determined by if the feature gate `SeparateTaintEvictionController` is used or not.
227
229
228
230
###### How can someone using this feature know that it is working for their instance?
229
231
-[x] Other (treat as last resort)
230
-
- Details: Node taints and taint-based pod eviction should work as usual and there is no significant change in the number pod evictions and pod eviction latency.
232
+
- Details: Node taints and taint-based pod eviction should work as usual and there is no significant change in the number pod evictions and pod eviction latency.
231
233
232
234
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
233
235
The performance of node taint-based eviction should remain the same level as before.
234
236
235
237
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
236
-
The metrics for both `NodeLifecycleController` and `TaintManager`'s queues should stay the same levels as before, the number of pod evictions and pod eviction latency.
238
+
The metrics for both `NodeLifecycleController` and `TaintEvictionController`'s queues should stay the same levels as before, the number of pod evictions and pod eviction latency.
- Components exposing the metric: `kube-controller-manager`
241
243
242
244
###### Are there any missing metrics that would be useful to have to improve observability of this feature?
@@ -262,7 +264,7 @@ No
262
264
No
263
265
264
266
###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs?
265
-
It may slightly increase the time of pod eviction.
267
+
It may slightly increase the time of pod eviction.
266
268
267
269
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
268
270
No
@@ -279,22 +281,23 @@ The same behavior as the current version: fail to add taint and/or evict pods on
279
281
No
280
282
281
283
###### What steps should be taken if SLOs are not being met to determine the problem?
282
-
If the pod eviction latency increases significantly, validate if the communication between `NodeLifecycleController` and `TaintManager` works. If the number of pod evictions is abnormal, run tests to verify the `TaintManager` works properly.
284
+
If the pod eviction latency increases significantly, validate if the communication between `NodeLifecycleController` and `TaintEvictionController` works. If the number of pod evictions is abnormal, run tests to verify the `TaintEvictionController` works properly.
283
285
284
286
## Implementation History
285
287
286
-
* 2023-03-06: Initial KEP published.
288
+
* 2023-03-06: Initial KEP published.
289
+
* 2023-10-23: KEP updated to update name of the `SeparateTaintEvictionController` feature-flag and exposed metrics.
287
290
288
291
## Drawbacks
289
292
290
293
## Alternatives
291
294
292
-
Keeping the code as-is is an option, but it will make future extension of `TaintManager` harder and less flexible.
295
+
Keeping the code as-is is an option, but it will make future extension of `TaintEvictionController` harder and less flexible.
293
296
294
297
295
298
## Infrastructure Needed (Optional)
296
299
297
300
N/A
298
301
299
302
## Note
300
-
`taint-manager`, `TaintManager` and `NoExecuteTaintManager` are used interchangeably in this doc.
303
+
`taint-manager`, `TaintManager` and `TaintEvictionController` are used interchangeably in this doc.
0 commit comments