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/3721-support-for-env-files/README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,13 +289,11 @@ KEY2=VALUE2
289
289
...
290
290
```
291
291
292
-
2.**Variable Naming**: We will apply the same variable name [restrictions](https://github.com/kubernetes/kubernetes/blob/a7ca13ea29ba5b3c91fd293cdbaec8fb5b30cee2/pkg/apis/core/validation/validation.go#L2583-L2596) as other API-defined env vars, In the alpha phase, environment variable keys are restricted to ASCII characters matching the pattern `[-._a-zA-Z][-._a-zA-Z0-9]*`. This restriction will be relaxed in the beta phase.
293
-
294
-
2.**Variable Value**: Similarly, in the alpha phase, environment variable values are also limited to ASCII characters within the [-._a-zA-Z][-._a-zA-Z0-9]* range to prevent injection attacks caused by passing command control characters through environment variables. This restriction will also be lifted in the beta phase.
292
+
2.**Variable Naming**: We will apply the same variable name [restrictions](https://github.com/kubernetes/kubernetes/blob/a7ca13ea29ba5b3c91fd293cdbaec8fb5b30cee2/pkg/apis/core/validation/validation.go#L2583-L2596) as other API-defined env vars.
295
293
296
294
3.**Duplicate Names**: If an environment variable is defined multiple times in the file, the last occurrence takes precedence and overrides any previous values.
297
295
298
-
4.**Size Limit**: To start with, the maximum allowed size for the env file will be 64KiB. Limits for key-value length will be added as a part of implementation after additional investigation.
296
+
4.**Size Limit**: To start with, the maximum allowed size for the env file will be 64KiB. Limits for key-value length will be added as a part of implementation after additional investigation, for environment variable names, we're temporarily enforcing a 128-character limit during the alpha phase, for environment variable values, we're temporarily enforcing a maximum size of 32k during alpha.
299
297
300
298
5.**File Location**: The env file must be placed within the `emptyDir` volume associated with the pod. If it is not found in the correct location, the Kubernetes API server will reject the pod creation request.
301
299
@@ -446,10 +444,11 @@ with this new fields:
446
444
447
445
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
448
446
449
-
Automated tests will cover the scenarios with and without the changes proposed
450
-
on this KEP. As defined under [Version Skew Strategy](#version-skew-strategy),
447
+
We will manually attempt an upgrade-downgrade test with the following scenario.
448
+
449
+
As defined under [Version Skew Strategy](#version-skew-strategy),
451
450
we are assuming the cluster may have kubelets with older versions (without
452
-
this KEP' changes), therefore this will be covered of following new tests:
451
+
this KEP' changes):
453
452
454
453
1. When the kubelet is upgraded, the env files will be instantiated in the
455
454
container. On downgrade, the env files will be ignored but the pod will still
@@ -483,15 +482,17 @@ CONFIG_VAR=HELLO
483
482
484
483
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
485
484
486
-
N/A
485
+
SLI: Startup latency of schedulable stateful pods, excluding time to pull images, run init containers, provision volumes (in delayed binding mode) and unmount/detach volumes (from previous pod if needed), measured from pod creation timestamp to when all its containers are reported as started and observed via watch, measured as 99th percentile over last 5 minutes.
486
+
487
+
SLO: In default Kubernetes installation, 99th percentile per cluster-day1 <= X where X depends on storage provider
487
488
488
489
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
489
490
490
-
N/A
491
+
We can determine whether the service is healthy by checking if the started_containers_errors_total and started_pods_errors_total metrics are abnormally increasing.
491
492
492
493
###### Are there any missing metrics that would be useful to have to improve observability of this feature?
493
494
494
-
N/A
495
+
No
495
496
496
497
### Dependencies
497
498
@@ -515,7 +516,7 @@ No
515
516
516
517
###### Will enabling / using this feature result in increasing size or count of the existing API objects?
517
518
518
-
No
519
+
We have added the `fileKeyRef` data structure to `podSpec`, which will undoubtedly increase the size of the Pod API. The increase in size depends on the number of environment variables defined by the user, making it impossible to estimate the exact number of bytes added. However, this should not have a significant impact on the API. For many users, it merely involves migrating environment variables previously defined in `ConfigMap/Secret` to this new structure.
519
520
520
521
###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs?
521
522
@@ -527,7 +528,7 @@ No
527
528
528
529
###### Can enabling / using this feature result in resource exhaustion of some node resources (PIDs, sockets, inodes, etc.)?
529
530
530
-
No
531
+
Environment variables are not typically associated with PIDs, sockets, or inodes. However, non-standard usage patterns may introduce risks. For example: if expanded variables are used to launch numerous network services or open excessive file descriptors (e.g., environment variables defining large numbers of port numbers), this could indirectly lead to socket exhaustion.
0 commit comments