Skip to content

Commit a658078

Browse files
committed
promote 4396 to beta
1 parent 334d04c commit a658078

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
# of http://git.k8s.io/enhancements/OWNERS_ALIASES
44
kep-number: 4369
55
alpha:
6+
approver: "@jpbetz"
7+
beta:
68
approver: "@jpbetz"

keps/sig-node/4369-allow-special-characters-environment-variable/README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ checklist items _must_ be updated for the enhancement to be released.
5555

5656
Items marked with (R) are required *prior to targeting to a milestone / release*.
5757

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
6161
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
6262
- [ ] e2e Tests for all Beta API Operations (endpoints)
6363
- [ ] (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
184184

185185
#### Downgrade
186186

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

189189
### Version Skew Strategy
190190

@@ -211,7 +211,7 @@ No
211211

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

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,
215215
but cannot create workloads that use special characters as environment variables.
216216

217217
###### What happens if we reenable the feature if it was previously rolled back?
@@ -224,9 +224,7 @@ Yes.
224224

225225
### Rollout, Upgrade and Rollback Planning
226226

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

231229
###### What specific metrics should inform a rollback?
232230

@@ -242,7 +240,24 @@ No.
242240

243241
### Monitoring Requirements
244242

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:
246+
247+
```
248+
kubectl get pods --all-namespaces -o json | jq -r '.items[] | select(.spec.containers[].env[]?.name | test("^[a-zA-Z_][a-zA-Z0-9_]*$") | not) | [.metadata.namespace, .metadata.name, .spec.containers[].env[]?.name] | @tsv'
249+
```
250+
251+
###### 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:
246261

247262
### Dependencies
248263

@@ -294,6 +309,10 @@ No
294309

295310
\- 2023-12-21: Initial draft KEP
296311

312+
\- 2024-02-06: KEP promoted to implementable.
313+
314+
\- 2024-08-26: Promote to beta
315+
297316
## Drawbacks
298317

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

keps/sig-node/4369-allow-special-characters-environment-variable/kep.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ reviewers:
1111
- "@liggitt"
1212
- "@thockin"
1313
approvers:
14-
- "@liggitt"
1514
- "@thockin"
15+
- "@SergeyKanzhelev"
1616

1717
see-also: []
1818
replaces: []
1919

2020
# The target maturity stage in the current dev cycle for this KEP.
21-
stage: alpha
21+
stage: beta
2222

2323
# The most recent milestone for which work toward delivery of this KEP has been
2424
# done. This can be the current (upcoming) milestone, if it is being actively
2525
# worked on.
26-
latest-milestone: "v1.30"
26+
latest-milestone: "v1.32"
2727

2828
# The milestone at which this feature was, or is targeted to be, at each stage.
2929
milestone:

0 commit comments

Comments
 (0)