Skip to content

Commit 76f02cc

Browse files
authored
Merge pull request #4242 from sohankunkerkar/update-3983
KEP 3983: target to beta for 1.29
2 parents c7e989f + aefad4c commit 76f02cc

File tree

3 files changed

+37
-30
lines changed

3 files changed

+37
-30
lines changed

keps/prod-readiness/sig-node/3983.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
kep-number: 3983
55
alpha:
66
approver: "@johnbelamaric"
7+
beta:
8+
approver: "@johnbelamaric"

keps/sig-node/3983-drop-in-configuration/README.md

+31-22
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- [Graduation Criteria](#graduation-criteria)
2222
- [Alpha](#alpha)
2323
- [Beta](#beta)
24+
- [GA](#ga)
2425
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
2526
- [Version Skew Strategy](#version-skew-strategy)
2627
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
@@ -65,7 +66,7 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
6566

6667
## Summary
6768

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.
6970

7071

7172
## Motivation
@@ -77,10 +78,10 @@ Components in Kubernetes can similarly be configured by multiple entities and pr
7778

7879
### Goals
7980

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`
8182
* Extend kubelet configuration parsing code to handle files in the drop-in directory.
8283
* 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.
8485

8586
### Non-Goals
8687

@@ -89,7 +90,7 @@ Components in Kubernetes can similarly be configured by multiple entities and pr
8990

9091
## Proposal
9192

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:
9394

9495

9596
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
100101

101102
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.
102103

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.
104105

105106
Example:
106107

@@ -167,7 +168,7 @@ As a cluster admin, I would like to have cgroup management and log size manageme
167168
* Handling of zeroed fields
168169
* 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.
169170
* 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.
171172

172173
## Design Details
173174

@@ -182,15 +183,15 @@ As a cluster admin, I would like to have cgroup management and log size manageme
182183

183184
##### Unit tests
184185

185-
* Unit tests will be added, details to be added here
186+
* cmd/kubelet/app: 07-17-2023 27.6
186187

187188
##### Integration tests
188189

189-
* :
190+
* N/A
190191

191192
##### e2e tests
192193

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.
194195

195196
### Graduation Criteria
196197

@@ -200,7 +201,15 @@ Add ability to support drop-in configuration directory.
200201

201202
#### Beta
202203

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.
204213

205214
### Upgrade / Downgrade Strategy
206215

@@ -220,11 +229,12 @@ All behavior change is encapsulated within the Kubelet, so there is no version s
220229

221230
###### How can this feature be enabled / disabled in a live cluster?
222231

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.
226236

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.
228238

229239

230240
###### 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
234244

235245
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
236246

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.
239248

240249
###### What happens if we reenable the feature if it was previously rolled back?
241250

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.
244252

245253
###### Are there any tests for feature enablement/disablement?
246254

247255
A test will be added to assemble a single, functional kubelet configuration object from various individual drop-in config files.
248256

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-
251257

252258
### Rollout, Upgrade and Rollback Planning
253259

@@ -277,7 +283,8 @@ No
277283

278284
###### How can an operator determine if the feature is in use by workloads?
279285

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.
281288

282289

283290
###### 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.
351358

352359
###### What are other known failure modes?
353360

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`
355362

356363

357364
###### 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.
362369
## Implementation History
363370

364371
- 2023-05-04: KEP initialized.
372+
- 2023-07-17: Alpha is implemented in 1.28
373+
- 2023-09-25: KEP targeted to Beta in 1.29
365374

366375

367376
## Drawbacks

keps/sig-node/3983-drop-in-configuration/kep.yaml

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@ kep-number: 3983
33
authors:
44
- "@haircommander"
55
- "@yuqi-zhang"
6+
- "@sohankunkerkar"
67
owning-sig: sig-node
78
status: implementable
89
creation-date: 2023-05-04
10+
last-updated: 2023-09-25
911
reviewers:
1012
- "@harche"
1113
approvers:
1214
- "@mrunalp"
1315

1416
# The target maturity stage in the current dev cycle for this KEP.
15-
stage: alpha
17+
stage: beta
1618

1719
# The most recent milestone for which work toward delivery of this KEP has been
1820
# done. This can be the current (upcoming) milestone, if it is being actively
1921
# worked on.
20-
latest-milestone: "v1.28"
22+
latest-milestone: "v1.29"
2123

2224
# The milestone at which this feature was, or is targeted to be, at each stage.
2325
milestone:
@@ -26,12 +28,6 @@ milestone:
2628
stable: "v1.31"
2729

2830
# The following PRR answers are required at alpha release
29-
# List the feature gate name and the components for which it must be enabled
30-
# Feature gate is not required for this KEP
31-
feature-gates:
32-
- name: KubeletDropInConfig
33-
components:
34-
- kubelet
3531
disable-supported: true
3632

3733
# The following PRR answers are required at beta release

0 commit comments

Comments
 (0)