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
@@ -65,7 +66,7 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
65
66
66
67
## Summary
67
68
68
-
Add support for a drop-in configuration directory for the Kubelet. This directory can be specified via a "--config-dir" flag, and configuration files will be processed in alphanumeric order. The flag will be empty by default and if not specified, drop-in support will not be enabled. Establishment of conventions for configuration processing will be done, and further work can be done to add this support for other components.
69
+
Add support for a drop-in configuration directory for the Kubelet. This directory can be specified via a `--config-dir` flag, and configuration files will be processed in alphanumeric order. The flag will be empty by default and if not specified, drop-in support will not be enabled. During the alpha phase, we introduced an environment variable called `KUBELET_CONFIG_DROPIN_DIR_ALPHA` to control the drop-in configuration directory for testing purposes. In the beta phase, we plan to enhance the feature with E2E testing and streamline the configuration process. As part of this optimization, we will remove the `KUBELET_CONFIG_DROPIN_DIR_ALPHA` environment variable, simplifying configuration management. The feature will remain off by default during the beta phase, and we will consider enabling it by default in future releases.
69
70
70
71
71
72
## Motivation
@@ -77,10 +78,10 @@ Components in Kubernetes can similarly be configured by multiple entities and pr
77
78
78
79
### Goals
79
80
80
-
* Add support for a "--config-dir" flag to the kubelet to allow users to specify a drop-in directory, which will override the configuration for the Kubelet located at `/etc/kubernetes/kubelet.conf`
81
+
* Add support for a `--config-dir` flag to the kubelet to allow users to specify a drop-in directory, which will override the configuration for the Kubelet located at `/etc/kubernetes/kubelet.conf`
81
82
* Extend kubelet configuration parsing code to handle files in the drop-in directory.
82
83
* Define Kubernetes best-practices for configuration definitions, similarly to [API conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md). This is intended for other maintainers who would wish to setup a configuration object that works well with drop-in directories.
83
-
*As a goal for beta, Add ability to easily view the effective configuration that is being used by kubelet.
84
+
* Add ability to easily view the effective configuration that is being used by kubelet.
84
85
85
86
### Non-Goals
86
87
@@ -89,7 +90,7 @@ Components in Kubernetes can similarly be configured by multiple entities and pr
89
90
90
91
## Proposal
91
92
92
-
This proposal aims to add support for a drop-in configuration directory for the kubelet via specifying a "--config-dir" flag (for example, `/etc/kubernetes/kubelet.conf.d`). Users are able to specify individually configurable kubelet config snippets in files, formatted in the same way as the existing kubelet.conf file. The kubelet will process the configuration provided in the drop-in directory in alphanumeric order:
93
+
This proposal aims to add support for a drop-in configuration directory for the kubelet via specifying a `--config-dir` flag (for example, `/etc/kubernetes/kubelet.conf.d`). Users are able to specify individually configurable kubelet config snippets in files, formatted in the same way as the existing kubelet.conf file. The kubelet will process the configuration provided in the drop-in directory in alphanumeric order:
93
94
94
95
95
96
1. If no other configuration for the subfield(s) exist, append to the base configuration
@@ -100,7 +101,7 @@ This proposal aims to add support for a drop-in configuration directory for the
100
101
101
102
If there are any issues with the drop-ins (e.g. formatting errors), the error will be reported in the same way as a misconfigured kubelet.conf file. Only files with a `.conf` extension will be parsed. All other files found will be skipped and logged.
102
103
103
-
This drop-in directory is purely optional and if empty, the base configuration is used and no behavior changes will be introduced. The "--config-dir" flag will be empty by default and if not specified, drop-in support will not be enabled. This aims to align with "--config" flag defaults.
104
+
This drop-in directory is purely optional and if empty, the base configuration is used and no behavior changes will be introduced. The `--config-dir` flag, along with the `KUBELET_CONFIG_DROPIN_DIR_ALPHA` environment variable, allows users to specify a drop-in configuration directory for the Kubelet. This directory is empty by default, ensuring that drop-in support is not enabled unless explicitly configured. This aims to align with `--config` flag defaults.
104
105
105
106
Example:
106
107
@@ -167,7 +168,7 @@ As a cluster admin, I would like to have cgroup management and log size manageme
167
168
* Handling of zeroed fields
168
169
* It’s possible the configuration of the Kubelet does not handle not specified fields well. Special testing will need to be done for different types to define and ensure conformance of that behavior.
169
170
* Handling of lists
170
-
*Contention could be found with how lists should be handled (append or overwrite, also see proposal). Consensus should be found and testing performed.
171
+
*During the beta phase, we will conduct additional testing to address risks and refine the feature.
171
172
172
173
## Design Details
173
174
@@ -182,15 +183,15 @@ As a cluster admin, I would like to have cgroup management and log size manageme
182
183
183
184
##### Unit tests
184
185
185
-
*Unit tests will be added, details to be added here
186
+
*cmd/kubelet/app: 07-17-2023 27.6
186
187
187
188
##### Integration tests
188
189
189
-
*:
190
+
*N/A
190
191
191
192
##### e2e tests
192
193
193
-
*:
194
+
*A test should confirm that the kubelet.conf.d directory is correctly processed, and its contents are accurately reported in the configz endpoint.
194
195
195
196
### Graduation Criteria
196
197
@@ -200,7 +201,15 @@ Add ability to support drop-in configuration directory.
200
201
201
202
#### Beta
202
203
203
-
Add ability to easily view the effective configuration that is being used by kubelet. Details to be added during beta phase.
204
+
Add ability to augment the feature's capabilities with a focus on robustness and testing, which includes:
205
+
- Implement the capability to query the kubelet's full effective configuration via API, covering both standard mode and standalone kubelet mode. Thoroughly test this functionality, ensuring accurate reporting of kubelet.conf.d directory and contents in the configz endpoint.
206
+
- Remove the environment variable `KUBELET_CONFIG_DROPIN_DIR_ALPHA`, introduced during the Alpha phase, to streamline the user experience by simplifying configuration management.
207
+
- Keep the feature disabled by default in the Beta phase. Explicit opt-in activation is required to enable the feature.
208
+
- Provide official guidance on the Kubernetes website for merging lists and structures in the kubelet configuration file, including documentation for the `/configz` endpoint.
209
+
210
+
#### GA
211
+
212
+
Collect user feedback and set the `--config-dir` option to specify the default configuration directory, ensuring it is enabled by default and points to an appropriate path.
204
213
205
214
### Upgrade / Downgrade Strategy
206
215
@@ -220,11 +229,12 @@ All behavior change is encapsulated within the Kubelet, so there is no version s
220
229
221
230
###### How can this feature be enabled / disabled in a live cluster?
222
231
223
-
-[x] Feature gate
224
-
- Feature gate name: KubeletDropInConfig
225
-
- Components depending on the feature gate: Kubelet
232
+
-[] Feature gate
233
+
N/A
234
+
235
+
In addition to configuring the KUBELET_CONFIG_DROPIN_DIR_ALPHA environment variable, administrators must explicitly set the --config-dir flag in the kubelet's command-line interface (CLI) to enable this feature.. Starting from the beta phase, specifying the --config-dir flag is the only way to enable this feature. The default value for --config-dir is an empty string, which means the feature is disabled by default.
226
236
227
-
Aside from the featuregate, admins will also have to explicitly enable the kubelet flag to enable this.
237
+
The decision to use an environment variable (KUBELET_CONFIG_DROPIN_DIR_ALPHA) over a feature gate was made to avoid potential conflicts in configuration settings. With the current configuration flow, feature gates could lead to unexpected behavior when CLI settings conflict with the kubelet.conf.d directory. The potential issue arises when the CLI initially sets the feature gate to "off," but the kubelet configuration specifies it as "on." In this scenario, the kubelet would start with the feature gate "off," switch it to "on" during configuration rendering, and then have conflicting settings when reading the kubelet.conf.d directory, leading to unexpected behavior. By using an environment variable during the alpha phase, we provided a simpler and more predictable way to control the drop-in configuration directory for testing. In the beta phase, we are removing this environment variable to streamline configuration management and enhance the user experience.
228
238
229
239
230
240
###### Does enabling the feature change any default behavior?
@@ -234,20 +244,16 @@ No, upgrading to a version of the Kubelet with this feature will not enable the
234
244
235
245
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
236
246
237
-
Yes. Roll back and remove the `--config-dir` flag from the kubelet's CLI, as well as the KubeletDropInConfig featuregate.
238
-
247
+
Yes. To disable the feature, roll back by removing the --config-dir flag from the kubelet's CLI.
239
248
240
249
###### What happens if we reenable the feature if it was previously rolled back?
241
250
242
-
This feature will be re-enabled via adding back the `--config-dir` flag to the CLI, as well as the KubeletDropInConfig featuregate, as mentioned above.
243
-
251
+
This feature will be re-enabled via adding back the `--config-dir` flag to the CLI.
244
252
245
253
###### Are there any tests for feature enablement/disablement?
246
254
247
255
A test will be added to assemble a single, functional kubelet configuration object from various individual drop-in config files.
248
256
249
-
A test will be added to check that if a user attempts to use the `--config-dir` flag without the featuregate, the kubelet will properly error.
250
-
251
257
252
258
### Rollout, Upgrade and Rollback Planning
253
259
@@ -277,7 +283,8 @@ No
277
283
278
284
###### How can an operator determine if the feature is in use by workloads?
279
285
280
-
Workloads do not directly consume this feature, it is for cluster admins during kubelet configuration. Administrators can check the kubelet feature flag metric `kubernetes_feature_enabled` to see if this is enabled.
286
+
Workloads do not directly consume this feature, it is for cluster admins during kubelet configuration.
287
+
To check if the feature is enabled, users can query the merged configuration. One way to do this is by hitting the configz endpoint using kubectl or a standalone kubelet mode.
281
288
282
289
283
290
###### How can someone using this feature know that it is working for their instance?
@@ -351,7 +358,7 @@ This feature is enabled in Kubelet alone.
351
358
352
359
###### What are other known failure modes?
353
360
354
-
Invalid configuration, same as exists today with `/etc/kubernetes/kubelet.conf`
361
+
Invalid configuration, including issues like incorrect file permissions or misconfigured settings for the drop-in directory and files, falls under known failure modes, same as exists today with `/etc/kubernetes/kubelet.conf`
355
362
356
363
357
364
###### What steps should be taken if SLOs are not being met to determine the problem?
@@ -362,6 +369,8 @@ Fix the invalid configuration, or remove configurations.
0 commit comments