kubernetes/kubernetes
Vedi su GitHubAPI can be streamlined: assume same key for some `EnvVarSource`
Open
Aperta il 9 giu 2025
area/apihelp wantedkind/featureneeds-triagepriority/backlogsig/node
Descrizione
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/api/core/v1/types.go#L2376
All EnvVarSource must specify name in the parent, but the ConfigMapKeyRef and SecretKeyRef fields both require a key to be specified. https://github.com/kubernetes/enhancements/pull/5384 introduces another case.
It seems like we could assume the env var's name if the key is not specified. One less line of YAML in many cases.
It would require a feature gate which means a (small) KEP.
Impl is in pkg/kubelet/kubelet_pods.go