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
Copy file name to clipboardExpand all lines: keps/sig-node/4369-allow-special-characters-environment-variable/README.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,9 @@ checklist items _must_ be updated for the enhancement to be released.
55
55
56
56
Items marked with (R) are required *prior to targeting to a milestone / release*.
57
57
58
-
-[] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
59
-
-[] (R) KEP approvers have approved the KEP status as `implementable`
60
-
-[] (R) Design details are appropriately documented
58
+
-[x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
59
+
-[x] (R) KEP approvers have approved the KEP status as `implementable`
60
+
-[x] (R) Design details are appropriately documented
61
61
-[ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
62
62
-[ ] e2e Tests for all Beta API Operations (endpoints)
63
63
-[ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
@@ -184,7 +184,7 @@ Environment variables previously set by the user will not change. To use this en
184
184
185
185
#### Downgrade
186
186
187
-
users need to reset their environment variables for special characters to normal characters.
187
+
After downgrade, environment variables containing special characters will continue to work as expected, but any writes to resources to add or change environment variables must set the environment variable names to only use normal characters.
188
188
189
189
### Version Skew Strategy
190
190
@@ -211,7 +211,7 @@ No
211
211
212
212
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
213
213
214
-
If close the feature gate, already running workloads will not be affected in any way,
214
+
If disable the feature gate, already running workloads will not be affected in any way,
215
215
but cannot create workloads that use special characters as environment variables.
216
216
217
217
###### What happens if we reenable the feature if it was previously rolled back?
@@ -224,9 +224,7 @@ Yes.
224
224
225
225
### Rollout, Upgrade and Rollback Planning
226
226
227
-
###### How can a rollout or rollback fail? Can it impact already running workloads?
228
-
229
-
When a feature gate is closed, already running workloads are not affected in any way, but update fields for workload will cause the workload to fail.
227
+
When the feature gate is disabled, workloads that are already running will not be affected. If environment variables contain special characters, changes to fields other than the environment variables will not cause workloads to fail. However, if the environment variable fields are modified, they may fail to recreate Pods or ReplicaSets due to the Apiserver's validation logic, which could result in workload failures.
230
228
231
229
###### What specific metrics should inform a rollback?
232
230
@@ -242,7 +240,24 @@ No.
242
240
243
241
### Monitoring Requirements
244
242
245
-
- We will investigate in the beta version how to monitor kubelet/CRI implementations could fail on pods using this enhancement.
243
+
###### How can an operator determine if the feature is in use by workloads?
244
+
245
+
Yes, operators can use the Kubenetes API to achieve this. They need to get all pods in the cluster and check if any pod has set a field other than `[-._a-zA-Z][-._a-zA-Z0-9]*` as an environment variable name. For example, we can find the namespaces and names of pods using this feature and their environment variable names using the following command:
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
252
+
253
+
According to the test results in https://github.com/HirazawaUi/verfiy-container-env, the container runtime is very lenient with using special characters as environment variables, and almost no failures will occur. However, if unexpected boundary conditions occur, `run_podsandbox_errors_total` can still help us record some problems.
254
+
255
+
-[x] Metrics
256
+
- Metric name: run_podsandbox_errors_total
257
+
-[Optional] Aggregation method:
258
+
- Components exposing the metric: kubelet
259
+
-[ ] Other (treat as last resort)
260
+
- Details:
246
261
247
262
### Dependencies
248
263
@@ -294,6 +309,10 @@ No
294
309
295
310
\- 2023-12-21: Initial draft KEP
296
311
312
+
\- 2024-02-06: KEP promoted to implementable.
313
+
314
+
\- 2024-08-26: Promote to beta
315
+
297
316
## Drawbacks
298
317
299
318
If the envvar name character set is extended, all the things currently consuming and using envvar names from the API will have an impact and may break or be unsafe.
0 commit comments