From e941f65be6fadeb69b63c2c3fa60aaed94186fae Mon Sep 17 00:00:00 2001 From: LarytheLord Date: Fri, 27 Feb 2026 13:17:04 +0530 Subject: [PATCH] docs(api): clarify env var key constraints in core types --- pkg/apis/core/types.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/apis/core/types.go b/pkg/apis/core/types.go index d5fb3eae978..98da04eb2f3 100644 --- a/pkg/apis/core/types.go +++ b/pkg/apis/core/types.go @@ -2350,7 +2350,8 @@ type SecretKeySelector struct { // EnvFromSource represents the source of a set of ConfigMaps or Secrets type EnvFromSource struct { - // Optional text to prepend to the name of each environment variable. Must be a C_IDENTIFIER. + // Optional text to prepend to the name of each environment variable. + // May consist of any printable ASCII characters except '='. // +optional Prefix string // The ConfigMap to select from. @@ -2640,7 +2641,8 @@ type Container struct { // +optional Ports []ContainerPort // List of sources to populate environment variables in the container. - // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // The keys defined within a source may consist of any printable ASCII characters except '='. + // All invalid keys // will be reported as an event when the container is starting. When a key exists in multiple // sources, the value associated with the last source will take precedence. // Values defined by an Env with a duplicate key will take precedence. @@ -4427,7 +4429,8 @@ type EphemeralContainerCommon struct { // +optional Ports []ContainerPort // List of sources to populate environment variables in the container. - // The keys defined within a source must be a C_IDENTIFIER. All invalid keys + // The keys defined within a source may consist of any printable ASCII characters except '='. + // All invalid keys // will be reported as an event when the container is starting. When a key exists in multiple // sources, the value associated with the last source will take precedence. // Values defined by an Env with a duplicate key will take precedence.